/* * protected override async Task DeleteFromServer() * { * var client = WebApiClientFactory.CreateElmahApplicationApiClient(); * var item = Item; * * var result = await client.DeleteEntityAsync(item); * this.StatusOfResult = result.BusinessLogicLayerResponseStatus; * this.StatusMessageOfResult = result.GetStatusMessage(); * } */ protected override async Task <Elmah.ViewModelData.ElmahApplication.ItemVM> GetFromServer(Elmah.EntityContracts.IElmahApplicationIdentifier identifier) { var client = WebApiClientFactory.CreateElmahApplicationApiClient(); var result = await client.GetItemVMAsync(identifier.Application); return(result); }
protected override async Task <Elmah.CommonBLLEntities.ElmahApplicationResponseMessageBuiltIn> UpsertToServer() { var client = WebApiClientFactory.CreateElmahApplicationApiClient(); var item = Item; var result = await client.UpsertEntityAsync(item); return(result); }
protected override async Task <Elmah.ViewModelData.ElmahApplication.IndexVM> GetFromServer() { var vmData = new Elmah.ViewModelData.ElmahApplication.IndexVM { Criteria = this.Criteria, QueryPagingSetting = CachingOption == Framework.Xaml.CachingOptions.NoCaching ? this.QueryPagingSetting : new Framework.Queries.QueryPagingSetting(1, 10000), QueryOrderBySettingCollection = new Framework.Queries.QueryOrderBySettingCollection(QueryOrderBySettingCollection.Where(t => t.IsSelected)), }; vmData.Criteria.CanQueryWhenNoQuery = true; /* * // Add extra QueryOrderBySetting, eg CategoryName -> Name of this class. * if (QueryOrderBySettingCollection.Any(t => t.IsSelected && t.PropertyName == nameof(Elmah.DataSourceEntities.ElmahApplication.??))) * { * vmData.QueryOrderBySettingCollection.Add(new Framework.Queries.QueryOrderBySetting { PropertyName = nameof(Elmah.DataSourceEntities.ElmahApplication.??), Direction = QueryOrderBySettingCollection.First(t => t.IsSelected && t.PropertyName == nameof(Elmah.DataSourceEntities.ElmahApplication.??)).Direction } ); * } */ var client = WebApiClientFactory.CreateElmahApplicationApiClient(); var result = await client.GetIndexVMAsync(vmData); return(result); }