Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }