AJH.CMS.Core.Data.CategoryDataMapper.GetCategorys C# (CSharp) Method

GetCategorys() static private method

static private GetCategorys ( ) : List
return List
        internal static List<Category> GetCategorys()
        {
            List<Category> colCategorys = null;
            Category category = null;

            using (SqlConnection sqlConnection = new SqlConnection(CMSCoreBase.CMSCoreConnectionString))
            {
                SqlCommand sqlCommand = new SqlCommand(SN_CATEGORY_GET_ALL, sqlConnection);
                sqlCommand.CommandType = System.Data.CommandType.StoredProcedure;

                sqlCommand.Connection.Open();
                using (SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(System.Data.CommandBehavior.CloseConnection))
                {
                    colCategorys = new List<Category>();
                    while (sqlDataReader.Read())
                    {
                        category = GetCategory(colCategorys, sqlDataReader);
                        FillFromReader(category, sqlDataReader);
                    }

                    sqlDataReader.Close();
                    sqlCommand.Connection.Close();
                }
            }
            return colCategorys;
        }

Same methods

CategoryDataMapper::GetCategorys ( int PortalID, int LanguageID ) : List
CategoryDataMapper::GetCategorys ( int ModuleID, int PortalID, int LanguageID ) : List