Example #1
0
 public static void UpdateUser(this User user, Models.Library.Client client)
 {
     user.DrivingLicense = client.DrivingLicense;
     user.FIO            = client.FIO;
     user.PhoneNumber    = client.PhoneNumber;
     user.Passport       = client.Passport;
     user.UserType       = client.Role;
     user.DateOfBirth    = new DateTime?(client.DateOfBirth);
 }
Example #2
0
 public static User CreateUserFromClient(Models.Library.Client client)
 {
     return(new User()
     {
         DrivingLicense = client.DrivingLicense,
         FIO = client.FIO,
         PhoneNumber = client.PhoneNumber,
         Passport = client.Passport,
         UserType = client.Role,
         DateAdded = DateTime.Now,
         DateOfBirth = new DateTime?(client.DateOfBirth)
     });
 }