Carrotware.CMS.Core.SiteData.GetSiteByID C# (CSharp) Method

GetSiteByID() public static method

public static GetSiteByID ( System.Guid siteID ) : SiteData
siteID System.Guid
return SiteData
        public static SiteData GetSiteByID(Guid siteID)
        {
            using (CarrotCMSDataContext _db = CarrotCMSDataContext.Create()) {
                carrot_Site s = CompiledQueries.cqGetSiteByID(_db, siteID);

                if (s != null) {
            #if DEBUG
                    Debug.WriteLine(" ================ " + DateTime.UtcNow.ToString() + " ================");
                    Debug.WriteLine("Grabbed site : GetSiteByID(Guid siteID) " + siteID.ToString());
            #endif
                    return new SiteData(s);
                } else {
                    return null;
                }
            }
        }

Usage Example

Ejemplo n.º 1
0
        public SiteExport(Guid siteID)
        {
            SiteData s = null;
            List <ContentPageExport> pages = null;

            s = SiteData.GetSiteByID(siteID);

            pages = ContentImportExportUtils.ExportAllSiteContent(siteID);

            SetVals(s, pages);
        }
All Usage Examples Of Carrotware.CMS.Core.SiteData::GetSiteByID