public bool createAccount(string userName, string password) { if (myDS.getDataStore(userName) == null) { var newDataStore = new DataStore(userName, password); myDS.setData(newDataStore); return(true); } else { return(false); } }
public async Task <bool> createAccount(string userName, string password) { if (await myDS.getDataStore(userName) == null) { var newDataStore = new DataStore(userName, password); await myDS.setData(newDataStore); return(true); } else { return(false); } }