Guest User

Untitled

a guest
Oct 23rd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public partial class Employee
  2. {
  3. public System.Guid ID { get; set; }
  4. public string LastName { get; set; }
  5. public string FirstName { get; set; }
  6. public string Patronymic { get; set; }
  7. public Nullable<System.DateTime> BirthDay { get; set; }
  8. public Nullable<System.Guid> DepartmentID { get; set; }
  9. [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
  10. public int Age
  11. {
  12. get
  13. {
  14. if (BirthDay != null)
  15. return (DateTime.Now - BirthDay.Value).Days / 365;
  16. return 0;
  17. }
  18. set { }
  19. }
  20.  
  21. }
Add Comment
Please, Sign In to add comment