コード例 #1
0
 public static List <User> UsersModelsToUsers(List <UserModel> users)
 {
     return(users.Select(user => new User()
     {
         Id = user.Id,
         FirstName = user.FirstName,
         LastName = user.LastName,
         Password = user.Password,
         UserName = user.UserName,
         Notes = NoteMapper.NotesModelsToNotes(user.Notes.ToList())
     }).ToList());
 }
コード例 #2
0
 public static User UserModelToUser(UserModel user)
 {
     return(new User()
     {
         Id = user.Id,
         FirstName = user.FirstName,
         LastName = user.LastName,
         Password = user.Password,
         UserName = user.UserName,
         Notes = NoteMapper.NotesModelsToNotes(user.Notes.ToList())
     });
 }