/// <summary>
        /// Queries the API message.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <returns></returns>
        public List <ApiMessage> QueryApiMessage(ApiMessageCriteria criteria)
        {
            const string spName = "sp_QueryApiMessage";

            try
            {
                criteria.CheckNullObject(nameof(criteria));

                var parameters = new List <SqlParameter>
                {
                    GenerateSqlSpParameter(column_Key, criteria.Key),
                    GenerateSqlSpParameter(column_Count, criteria.Count),
                    GenerateSqlSpParameter(column_ServerIdentifier, criteria.ServerIdentifier),
                    GenerateSqlSpParameter(column_ServiceIdentifier, criteria.ServiceIdentifier),
                    GenerateSqlSpParameter(column_Category, criteria.Category),
                    GenerateSqlSpParameter(column_Message, criteria.Message),
                    GenerateSqlSpParameter(column_FromStamp, criteria.FromStamp),
                    GenerateSqlSpParameter(column_ToStamp, criteria.ToStamp)
                };

                return(ExecuteReader(spName, parameters));
            }
            catch (Exception ex)
            {
                throw ex.Handle(new { criteria });
            }
        }
        /// <summary>
        /// Queries the API message.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <returns></returns>
        public List <ApiMessage> QueryApiMessage(ApiMessageCriteria criteria)
        {
            try
            {
                criteria.CheckNullObject(nameof(criteria));

                using (var controller = new ApiMessageAccessController(_sqlConnectionString))
                {
                    return(controller.QueryApiMessage(criteria));
                }
            }
            catch (Exception ex)
            {
                throw ex.Handle(new { criteria });
            }
        }