public UserModel Insert(NewUserRequestModel newUser) { string message; if (NewUserRequestModel.Validate(newUser, out message)) { User user = new User(); user.Username = newUser.Username; user.Salt = Hasher.GetSalt(); user.Password = Hasher.Hash(newUser.Password, user.Salt); _userRepo.Insert(user); return Mapper.Map<User, UserModel>(user); } else { return null; } }
partial void UpdateUser(User instance);
partial void DeleteUser(User instance);
partial void InsertUser(User instance);