public void Load(object sender = null) { string search = sender?.ToString() ?? string.Empty; IsBusy = true; Task.Run(async() => { POCO.MstCustomerFilter customerFilter = null; if (!string.IsNullOrEmpty(search)) { customerFilter = new MstCustomerFilter() { Customer = search, filterMethods = new FilterMethods() { Operations = new List <FilterOperation>() { new FilterOperation("Customer", Operation.Contains) } } }; } Customers = await ApiRequest <POCO.MstCustomerFilter, ObservableCollection <POCO.MstCustomer> > .PostRead("MstCustomer/BulkGet", customerFilter); IsBusy = false; }); }
public JsonResult BulkGet(MstCustomerFilter content) { var repos = new Repository.MstCustomer(); var result = content.FilterMethods == null ? repos.BulkRead() : repos.BulkRead(content, content.FilterMethods); return(Json(result, JsonRequestBehavior.AllowGet)); }