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;
        }