Carrotware.CMS.Core.ContentSnippet.GetSnippetBySlug C# (CSharp) Метод

GetSnippetBySlug() публичный статический Метод

public static GetSnippetBySlug ( System.Guid siteID, string categorySlug, bool bActiveOnly ) : ContentSnippet
siteID System.Guid
categorySlug string
bActiveOnly bool
Результат ContentSnippet
        public static ContentSnippet GetSnippetBySlug(Guid siteID, string categorySlug, bool bActiveOnly)
        {
            ContentSnippet _item = null;
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                vw_carrot_ContentSnippet query = CompiledQueries.GetLatestContentSnippetBySlug(_db, siteID, bActiveOnly, categorySlug);
                if (query != null) {
                    _item = new ContentSnippet(query);
                }
            }

            return _item;
        }