/// <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<Framework.Models.NameValuePair>"/></returns>
        public async Task <Framework.Services.BusinessLogicLayerResponseMessageNameValuePairCollection> GetMessageOfNameValuePairByCommon(
            Elmah.CommonBLLEntities.ElmahStatusCodeChainedQueryCriteriaCommon criteria
            , Framework.Queries.QueryPagingSetting queryPagingSetting
            , Framework.Queries.QueryOrderBySettingCollection queryOrderBySettingCollection
            , Framework.Models.DataServiceTypes dataServiceType = Framework.Models.DataServiceTypes.DataSourceResult)
        {
            //log.Info(string.Format("{0}: GetMessageOfNameValuePairByCommon", Framework.Models.LoggingOptions.UI_Process_Started.ToString()));
            var _Request = new Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageUserDefinedOfCommon(
                Framework.Services.BusinessLogicLayerRequestTypes.Search
                , "GetMessageOfNameValuePairByCommon"
                , Guid.NewGuid().ToString()
                );

            _Request.Criteria           = criteria;
            _Request.QueryPagingSetting = queryPagingSetting;
            if (queryOrderBySettingCollection == null || queryOrderBySettingCollection.Count == 0)
            {
                _Request.QueryOrderBySettingCollection = new Framework.Queries.QueryOrderBySettingCollection();
                _Request.QueryOrderBySettingCollection.Add("Name", Framework.Queries.QueryOrderDirections.Ascending);
            }
            else
            {
                _Request.QueryOrderBySettingCollection = queryOrderBySettingCollection;
            }
            _Request.DataServiceType = dataServiceType;

            Framework.Services.BusinessLogicLayerResponseMessageNameValuePairCollection _Response = await GetCollectionOfNameValuePairByCommon(_Request);

            return(_Response);
        }
/*
 *      /// <summary>
 *      /// Inserts the specified input.
 *      /// </summary>
 *      /// <param name="request">The request.</param>
 *      /// <returns>a message with action result</returns>
 *      public async Task<Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn> InsertEntity(Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageBuiltIn request)
 *      {
 *          var _retval = new Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn();
 *              _retval.BusinessLogicLayerRequestID = request.BusinessLogicLayerRequestID;
 *
 *          if (request != null && request.Criteria.Count == 1)
 *          {
 *              try
 *              {
 *                  //log.Info(string.Format("{0}: InsertEntity", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *                  var _resultFromDAL = await this.DALClassInstance.Insert(request.Criteria[0]);
 *
 *                  Framework.Services.BusinessLogicLayerResponseMessageBaseHelper.MapDataAccessLayerMessageToBusinessLogicLayerResponseMessage<List<Elmah.DataSourceEntities.ElmahStatusCode>>(_resultFromDAL, _retval);
 *                  //log.Info(string.Format("{0}: InsertEntity", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *              }
 *              catch(Exception ex)
 *              {
 *                  _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.MessageErrorDetected;
 *                  _retval.ServerErrorMessage = ex.Message;
 *              }
 *          }
 *          else
 *          {
 *              _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.RequestError;
 *          }
 *
 *          return _retval;
 *      }
 *
 *      /// <summary>
 *      /// Updates the specified input.
 *      /// </summary>
 *      /// <param name="request">The request.</param>
 *      /// <returns>a message with action result</returns>
 *      public async Task<Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn> UpdateEntity(Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageBuiltIn request)
 *      {
 *          var  _retval = new Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn();
 *          _retval.BusinessLogicLayerRequestID = request.BusinessLogicLayerRequestID;
 *
 *          if (request != null && request.Criteria.Count == 1)
 *          {
 *              try
 *              {
 *                  //log.Info(string.Format("{0}: UpdateEntity", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *                  var  _resultFromDAL = await this.DALClassInstance.Update(request.Criteria[0]);
 *
 *                  Framework.Services.BusinessLogicLayerResponseMessageBaseHelper.MapDataAccessLayerMessageToBusinessLogicLayerResponseMessage<List<Elmah.DataSourceEntities.ElmahStatusCode>>(_resultFromDAL, _retval);
 *                  //log.Info(string.Format("{0}: UpdateEntity", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *              }
 *              catch(Exception ex)
 *              {
 *                  _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.MessageErrorDetected;
 *                  _retval.ServerErrorMessage = ex.Message;
 *              }
 *          }
 *          else
 *          {
 *              _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.RequestError;
 *          }
 *
 *          return _retval;
 *      }
 *
 *      /// <summary>
 *      /// Batches the insert.
 *      /// </summary>
 *      /// <param name="request">The request.</param>
 *      /// <returns>a message with action result</returns>
 *      public async Task<Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn> BatchInsert(Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageBuiltIn request)
 *      {
 *          //log.Info(string.Format("{0}: BatchInsert", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *          var _retval = new Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn();
 *          _retval.BusinessLogicLayerRequestID = request.BusinessLogicLayerRequestID;
 *
 *          if (request != null)
 *          {
 *              try
 *              {
 *                  //log.Info(string.Format("{0}: GetCountOfEntityOfCommon", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *                  var _resultFromDAL = await this.DALClassInstance.BatchInsert(request.Criteria);
 *
 *                  Framework.Services.BusinessLogicLayerResponseMessageBaseHelper.MapDataAccessLayerMessageToBusinessLogicLayerResponseMessage<List<Elmah.DataSourceEntities.ElmahStatusCode>>(_resultFromDAL, _retval);
 *                  //log.Info(string.Format("{0}: GetCountOfEntityOfCommon", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *              }
 *              catch(Exception ex)
 *              {
 *                  _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.MessageErrorDetected;
 *                  _retval.ServerErrorMessage = ex.Message;
 *              }
 *          }
 *          else
 *          {
 *              _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.RequestError;
 *          }
 *          //log.Info(string.Format("{0}: BatchInsert", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *          return _retval;
 *      }
 *
 *      /// <summary>
 *      /// Batches the delete.
 *      /// </summary>
 *      /// <param name="request">The request.</param>
 *      /// <returns>a message with action result</returns>
 *      public async Task<Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn> BatchDelete(Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageBuiltIn request)
 *      {
 *          //log.Info(string.Format("{0}: BatchDelete", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *          var _retval = new Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn();
 *          _retval.BusinessLogicLayerRequestID = request.BusinessLogicLayerRequestID;
 *
 *          if (request != null)
 *          {
 *              try
 *              {
 *                  var _resultFromDAL = await this.DALClassInstance.BatchDelete(request.Criteria);
 *
 *                  Framework.Services.BusinessLogicLayerResponseMessageBaseHelper.MapDataAccessLayerMessageToBusinessLogicLayerResponseMessage<List<Elmah.DataSourceEntities.ElmahStatusCode>>(_resultFromDAL, _retval);
 *              }
 *              catch(Exception ex)
 *              {
 *                  _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.MessageErrorDetected;
 *                  _retval.ServerErrorMessage = ex.Message;
 *              }
 *          }
 *          else
 *          {
 *              _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.RequestError;
 *          }
 *          //log.Info(string.Format("{0}: BatchDelete", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *          return _retval;
 *      }
 *
 *      /// <summary>
 *      /// Batches the update.
 *      /// </summary>
 *      /// <param name="request">The request.</param>
 *      /// <returns>a message with action result</returns>
 *      public async Task<Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn> BatchUpdate(Elmah.CommonBLLEntities.ElmahStatusCodeRequestMessageBuiltIn request)
 *      {
 *          //log.Info(string.Format("{0}: BatchUpdate", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Started.ToString()));
 *          var _retval = new Elmah.CommonBLLEntities.ElmahStatusCodeResponseMessageBuiltIn();
 *          _retval.BusinessLogicLayerRequestID = request.BusinessLogicLayerRequestID;
 *
 *          if (request != null)
 *          {
 *              try
 *              {
 *                  var _resultFromDAL = await this.DALClassInstance.BatchDelete(request.Criteria);
 *
 *                  Framework.Services.BusinessLogicLayerResponseMessageBaseHelper.MapDataAccessLayerMessageToBusinessLogicLayerResponseMessage<List<Elmah.DataSourceEntities.ElmahStatusCode>>(_resultFromDAL, _retval);
 *              }
 *              catch(Exception ex)
 *              {
 *                  _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.MessageErrorDetected;
 *                  _retval.ServerErrorMessage = ex.Message;
 *              }
 *          }
 *          else
 *          {
 *              _retval.BusinessLogicLayerResponseStatus = Framework.Services.BusinessLogicLayerResponseStatus.RequestError;
 *          }
 *          //log.Info(string.Format("{0}: BatchUpdate", Framework.Models.LoggingOptions.Business_Logic_Layer_Process_Ended.ToString()));
 *          return _retval;
 *      }
 */

        #endregion InsertEntity/UpdateEntity/DeleteEntity/BatchInsert/BatchUpdate/BatchDelete

        /// <summary>
        /// Gets the collection of entity of common.
        /// </summary>
        /// <param name="isToCompareName">will compare/filter name property/field/column if true, otherwise false</param>
        /// <param name="name" > value to compare/filter with name 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.ElmahStatusCodeChainedQueryCriteriaCommon _GetElmahStatusCodeChainedQueryCriteriaCommon(
            bool isToCompareName, string name
            )
        {
            var criteria = new Elmah.CommonBLLEntities.ElmahStatusCodeChainedQueryCriteriaCommon();

            criteria.Common.Name = new QuerySystemStringContainsCriteria(isToCompareName, name);
            return(criteria);
        }