Carrotware.CMS.Core.ContentSnippet.Get C# (CSharp) 메소드

Get() 공개 정적인 메소드

public static Get ( System.Guid rootSnippetID ) : ContentSnippet
rootSnippetID System.Guid
리턴 ContentSnippet
        public static ContentSnippet Get(Guid rootSnippetID)
        {
            ContentSnippet _item = null;
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                vw_carrot_ContentSnippet query = CompiledQueries.cqGetLatestSnippetVersion(_db, rootSnippetID);
                if (query != null) {
                    _item = new ContentSnippet(query);
                }
            }

            return _item;
        }