//methods public bool CreateUser(UserDTO userDTO) { bool userCreated; if (userCollectionDAL.ValidateByUName(userDTO.UName) == true) { userCollectionDAL.CreateUser(userDTO); userCreated = true; } else { userCreated = false; } return(userCreated); }
public void CreateUser(UserModel newUser) { // Creates a new user // Map Logic model to DTO UserDTO newUserDTO = new UserDTO { UserName = newUser.UserName, FirstName = newUser.FirstName, LastName = newUser.LastName, Password = newUser.Password, Email = newUser.Email, DoB = newUser.DoB }; _userCollectionDAL.CreateUser(newUserDTO); }