示例#1
0
 public User CreateUser(UserDTO user)
 {
     UserServiceValidator.ValidateUser(user);
     if (_groupRepo.GetGroup(user.Group.Id) == null)
     {
         throw new InvalidDataException("User most have a group that already exists");
     }
     return(_userRepository.CreateUser(user));
 }
 public Group GetGroup(int id)
 {
     return(_groupepository.GetGroup(id));
 }