public ActionResult <int> Register([FromBody] UserBasics UserRegisterUser) { return(_userBiz.createUser(UserRegisterUser.userName, UserRegisterUser.password, UserRegisterUser.firstName, UserRegisterUser.lastName)); }
/// <summary> /// create a new user /// enter username, password, first name, last name /// </summary> /// <returns>success/failure</returns> public bool register() { Console.WriteLine("Please enter your username: "******"Please enter your password: "******""; do { password = Utility.hidePassword(); Console.WriteLine("\nPlease re-enter your password: "******"\nPasswords do not match. Please enter a password: "******"\nPlease enter your first name: "); var firstName = Console.ReadLine(); Console.WriteLine("Please enter your last name: "); var lastName = Console.ReadLine(); if (_userBiz.createUser(username, password, firstName, lastName) >= 1) { return(true); } Console.WriteLine("An account with that username already exists!"); return(false); }