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