Esempio n. 1
0
 public void CreateOwner(UserRegistrationDetailDTO user)
 {
     UserRegistrationDetailDTOAssembler asm = new UserRegistrationDetailDTOAssembler();
     User u =asm.FromDTO(user);
     _usersApplicationService.CreateOwner(u);
     
 }
Esempio n. 2
0
 public ActionResult Register([FromBody] UserRegistrationDetailDTO user)
 {
     if (user == null)
     {
         return(BadRequest("User parameter cannot be null"));
     }
     try
     {
         _usersFacade.CreateOwner(user);
         return(Ok());
     }
     catch (UserExistsByUsernameException ex)
     {
         return(BadRequest(ex.Message));
     }
 }
 public User FromDTO(UserRegistrationDetailDTO item)
 {
     return(new User(item.ID, item.Username, item.Password, null, null, 0, 0));
 }