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