/// <summary> /// Gets message of the collection of entity of common. /// </summary> /// <param name="criteria"></param> /// <param name="queryPagingSetting"></param> /// <param name="queryOrderBySettingCollection"></param> /// <returns>business layer built-in message <see cref="List<Elmah.DataSourceEntities.ElmahHost>"/></returns> public async Task <Elmah.CommonBLLEntities.ElmahHostResponseMessageBuiltIn> GetMessageOfEntityByIdentifier( Elmah.CommonBLLEntities.ElmahHostChainedQueryCriteriaIdentifier criteria , Framework.Queries.QueryPagingSetting queryPagingSetting , Framework.Queries.QueryOrderBySettingCollection queryOrderBySettingCollection , Framework.Models.DataServiceTypes dataServiceType = Framework.Models.DataServiceTypes.DataSourceResult) { //log.Info(string.Format("{0}: GetMessageOfEntityByIdentifier", Framework.Models.LoggingOptions.UI_Process_Started.ToString())); var _Request = new Elmah.CommonBLLEntities.ElmahHostRequestMessageUserDefinedOfIdentifier( Framework.Services.BusinessLogicLayerRequestTypes.Search , "GetMessageOfEntityByIdentifier" , Guid.NewGuid().ToString() ); _Request.Criteria = criteria; _Request.QueryPagingSetting = queryPagingSetting; if (queryOrderBySettingCollection == null || queryOrderBySettingCollection.Count == 0) { _Request.QueryOrderBySettingCollection = new Framework.Queries.QueryOrderBySettingCollection(); _Request.QueryOrderBySettingCollection.Add("Host", Framework.Queries.QueryOrderDirections.Ascending); } else { _Request.QueryOrderBySettingCollection = queryOrderBySettingCollection; } _Request.DataServiceType = dataServiceType; Elmah.CommonBLLEntities.ElmahHostResponseMessageBuiltIn _Response = await GetCollectionOfEntityByIdentifier(_Request); return(_Response); }
/// <summary> /// Gets the collection of entity of common. /// </summary> /// <param name="isToCompareHost">will compare/filter host property/field/column if true, otherwise false</param> /// <param name="host">value to compare/filter with host property/field/column</param> /// <param name="currentIndex">Index of the current.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="queryOrderByExpression">The query order by expression.</param> /// <returns></returns> private static Elmah.CommonBLLEntities.ElmahHostChainedQueryCriteriaIdentifier _GetElmahHostChainedQueryCriteriaIdentifier( bool isToCompareHost, string host ) { var criteria = new Elmah.CommonBLLEntities.ElmahHostChainedQueryCriteriaIdentifier(); criteria.Identifier.Host = new QuerySystemStringEqualsCriteria(isToCompareHost, host); return(criteria); }
/// <summary> /// Display one entity and all related entities if any, either single item or a list, based on foreign keys /// </summary> /// <returns></returns> //[Authorize(Roles = Elmah.MvcCore.Security.RolesCombination.AllRoles)] public async Task <ActionResult> Dashboard(string host = default(string)) { var criteria = new Elmah.CommonBLLEntities.ElmahHostChainedQueryCriteriaIdentifier(); criteria.Identifier.Host.NullableValueToCompare = host; using (var scope = _serviceProvider.CreateScope()) { var vm = (Elmah.AspNetMvcCoreViewModel.ElmahHost.DashboardVM)scope.ServiceProvider.GetRequiredService(typeof(Elmah.AspNetMvcCoreViewModel.ElmahHost.DashboardVM)); vm.SetServiceProvider(this._serviceProvider); vm.CriteriaOfMasterEntity = criteria; //TODO: this will be changed when have time to re-do asp.net mvc core UI. await vm.LoadData(null); return(View(vm)); } }