public int Create(UserDTO item) { Mapper.CreateMap<UserDTO, User>(); int result = Database.Users.Create(Mapper.Map<UserDTO, User>(item)).Id; Database.Save(); return result; }
public UserDTO AddUser(UserDTO newUser) { newUser.created = DateTime.Now; newUser.avaUrl = "#"; newUser.id = _userSvc.Create(newUser); _albumSvc.Create(new AlbumDTO { name = "DefaultAlbum", created = DateTime.Now, @private = true, userId = newUser.id, likes = 0 }); return newUser; }
public void Update(UserDTO item) { }