Exemple #1
0
 public void CreateUser(CreateUser viewModel)
 {
     var user = new User
     {
         Name = viewModel.UserName,
         Password = EncryptPassword(viewModel.Password)
     };
     repository.Add(user);
     SaveUser();
 }
Exemple #2
0
 public void UpdateUser(User model)
 {
     var user = GetUserById(model.Id);
     user.Password = EncryptPassword(model.Password);
     repository.Update(user);
     SaveUser();
 }