public static List <User> UsersModelsToUsers(List <UserDTOM> users) { return(users.Select(user => new User() { Id = user.Id, FirstName = user.FirstName, LastName = user.Password, UserName = user.UserName, Notes = NoteMapper.NotesModelsToNotes(user.Notes.ToList()) }).ToList()); }
public static User UserModelToUser(UserDTOM user) { return(new User() { Id = user.Id, FirstName = user.FirstName, LastName = user.Password, UserName = user.UserName, Notes = NoteMapper.NotesModelsToNotes(user.Notes.ToList()) }); }