我有员工实体
public class Employee
{
public Employee();
public int BossId { get; }
public int BossUserId { get; }
public string CostCentre { get; }
public int CostCentreId { get; }
public string Department { get; }
public int DepartmentId { get; }
public string Designation { get; }
public int DesignationId { get; }
public string EmailAddress { get; }
public int EmployeeId { get; }
public string FirstName { get; }
public string FullName { get; }
public string LastName { get; }
public string LoginId { get; }
public int UserId { get; }
public override string ToString();
}
我想在另一个实体中使用所有这些属性并为它们分配值。
我的另一个实体是
public class UserRoles
{
public UserRoles()
{
}
public int UserRoleId { get; set; }
public long EmpUserId { get; set; }
public int RoleId { get; set; }
public DateTime AddedOn { get; set; }
public long AddedBy { get; set; }
public long ModifiedBy { get; set; }
public DateTime ModifiedOnd { get; set; }
}
如果我创建 Employee 类的属性,我无法为其赋值。而且我不能像在某些 dll 中那样更改 Employee 类。
有什么办法可以覆盖它或继承并为这些属性赋值?