Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Employee
- {
- public System.Guid ID { get; set; }
- public string LastName { get; set; }
- public string FirstName { get; set; }
- public string Patronymic { get; set; }
- public Nullable<System.DateTime> BirthDay { get; set; }
- public Nullable<System.Guid> DepartmentID { get; set; }
- [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
- public int Age
- {
- get
- {
- if (BirthDay != null)
- return (DateTime.Now - BirthDay.Value).Days / 365;
- return 0;
- }
- set { }
- }
- }
Add Comment
Please, Sign In to add comment