public HttpStatusCode Register(Users user) { //check if a user with same email address is not already registered if (accountDao.CheckIfEmailAddressAlreadyExists(user.EmailAddress)) { return(HttpStatusCode.BadRequest); } accountDao.AddNewUserRegistration(user.UserName, user.EmailAddress, user.Password, user.MobileNumber, user.ResidentialAddress); return(HttpStatusCode.Accepted); }