Ejemplo n.º 1
0
 public static User UpdateUserFromEditUserModel(EditUserModel eum, User user)
 {
     user.Firstname = eum.Firstname;
     user.Lastname  = eum.Lastname;
     user.Email     = eum.Email;
     if (eum.UserType != null)
     {
         user.UserType = eum.UserType;
     }
     user.UserDescription = eum.UserDescription;
     return(user);
 }
Ejemplo n.º 2
0
        public static EditUserModel EditUserModalFromUser(User user)
        {
            EditUserModel userForEdit = new EditUserModel
            {
                Username        = user.Username,
                Firstname       = user.Firstname,
                Lastname        = user.Lastname,
                Email           = user.Email,
                UserType        = user.UserType,
                UserDescription = user.UserDescription
            };

            return(userForEdit);
        }