Carrotware.CMS.Core.ContentCategory.Get C# (CSharp) Method

Get() public static method

public static Get ( System.Guid CategoryID ) : ContentCategory
CategoryID System.Guid
return ContentCategory
        public static ContentCategory Get(Guid CategoryID)
        {
            ContentCategory _item = null;
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.GetDataContext()) {
                carrot_ContentCategory query = CompiledQueries.cqGetContentCategoryByID(_db, CategoryID);
                if (query != null) {
                    _item = new ContentCategory(query);
                }
            }

            return _item;
        }