public static async Task <DeliveryPerson> GetDeliveryPerson(string id) { DeliveryPerson deliveries = new DeliveryPerson(); deliveries = (await AzureHelper.MobileService.GetTable <DeliveryPerson>().Where(d => d.Id == id).ToListAsync()).FirstOrDefault(); return(deliveries); }
public static async Task <bool> Register(string email, string password, string confirmpassword) { bool result = false; if (!string.IsNullOrEmpty(password)) { if (password == confirmpassword) { var user = new DeliveryPerson() { Email = email, Password = password }; //await AzureHelper.MobileService.GetTable<User>().InsertAsync(user); //Using Generic function insert await AzureHelper.Insert <DeliveryPerson>(user); //<User> is not required as Type is taken from user result = true; } } return(result); }