/* * protected override async Task DeleteFromServer() * { * var client = WebApiClientFactory.CreateElmahTypeApiClient(); * var item = Item; * * var result = await client.DeleteEntityAsync(item); * this.StatusOfResult = result.BusinessLogicLayerResponseStatus; * this.StatusMessageOfResult = result.GetStatusMessage(); * } */ protected override async Task <Elmah.ViewModelData.ElmahType.ItemVM> GetFromServer(Elmah.EntityContracts.IElmahTypeIdentifier identifier) { var client = WebApiClientFactory.CreateElmahTypeApiClient(); var result = await client.GetItemVMAsync(identifier.Type); return(result); }
protected override async Task <Elmah.CommonBLLEntities.ElmahTypeResponseMessageBuiltIn> UpsertToServer() { var client = WebApiClientFactory.CreateElmahTypeApiClient(); var item = Item; var result = await client.UpsertEntityAsync(item); return(result); }
protected override async Task <Elmah.ViewModelData.ElmahType.IndexVM> GetFromServer() { var vmData = new Elmah.ViewModelData.ElmahType.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.ElmahType.??))) * { * vmData.QueryOrderBySettingCollection.Add(new Framework.Queries.QueryOrderBySetting { PropertyName = nameof(Elmah.DataSourceEntities.ElmahType.??), Direction = QueryOrderBySettingCollection.First(t => t.IsSelected && t.PropertyName == nameof(Elmah.DataSourceEntities.ElmahType.??)).Direction } ); * } */ var client = WebApiClientFactory.CreateElmahTypeApiClient(); var result = await client.GetIndexVMAsync(vmData); return(result); }