async Task <IEnumerable <Apartment> > GetSource(vm.ApartmentList info) { var query = Database.Of <Apartment>(); var result = await query.GetList(); return(result); }
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)); }
public async Task OnBound(vm.ApartmentList info) { info.Items = await GetSource(info) .Select(item => new vm.ApartmentList.ListItem(item)).ToList(); }
public async Task <ActionResult> Index(vm.ApartmentList info) { return(View(info)); }