public void Handle(UpdateRoleCommand command)
 {
     if (command.IsValid())
     {
         _detUow.RoleRepo.Edit <UpdateRoleCommand>(command);
         _detUow.Save();
     }
     else
     {
         throw new ArgumentException("Validation failed");
     }
 }
Exemple #2
0
 public void Handle(AddUserCommand command)
 {
     if (command.IsValid())
     {
         _detUow.UserRepo.Add <AddUserCommand>(command);
         _detUow.Save();
     }
     else
     {
         throw new ArgumentException("Validation failed");
     }
 }
 public void Handle(DeleteUserCommand command)
 {
     _detUow.UserRepo.Delete(command);
     _detUow.Save();
 }
 public void Handle(DeleteRoleCommand command)
 {
     _detUow.RoleRepo.Delete(command);
     _detUow.Save();
 }