public async Task<User> Login(string username, string password) { User user = new User(); var users = await client.GetTable<User>().Where(u => u.Username == username).ToListAsync(); if(users.Count > 0) { user = users[0]; } else { user = new User { Username = username, Password = password }; await client.GetTable<User>().InsertAsync(user); } return user; }
public async Task<User> Register(User user) { await Sleep(); return user; }
public async Task<User> Register(User user) { await client.GetTable<User>().InsertAsync(user); return user; }