// Registers the user public async Task <bool> RegisterUser(HomePage.ErrorHandling errorMessage, User user) => // Checks if there is a connection // If there is then it will try to post a user and return true or false based wether the user was able to be posted or not // If there is no connection then it returns false _checkConnection.hasConnection(errorMessage) ? await _userProxy.PostUser(errorMessage, user) : false;
//An asynchronous Task which takes in the info which is sent to proxy method, API call made to post user in db public async Task <string> Register(string uname, string email, string name, string pword) { return(await _userProxy.PostUser(new User { Uname = uname, Email = email, Name = name, Pword = pword })); }