예제 #1
0
        async Task <IEnumerable <Apartment> > GetSource(vm.ApartmentList info)
        {
            var query = Database.Of <Apartment>();

            var result = await query.GetList();

            return(result);
        }
예제 #2
0
        public async Task <ActionResult> Delete(vm.ApartmentList info, [Bind(Prefix = "list.item")] Apartment item)
        {
            try
            {
                await Database.Delete(item);
            }
            catch (Exception ex)
            {
                return(Notify(ex.Message, "error"));
            }

            await TryUpdateModelAsync(info);

            return(View(info));
        }
예제 #3
0
 public async Task OnBound(vm.ApartmentList info)
 {
     info.Items = await GetSource(info)
                  .Select(item => new vm.ApartmentList.ListItem(item)).ToList();
 }
예제 #4
0
 public async Task <ActionResult> Index(vm.ApartmentList info)
 {
     return(View(info));
 }