• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Data.CarrotCMSDataContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Carrotware.CMS.Data.CarrotCMSDataContext的典型用法代码示例。如果您正苦于以下问题:C# CarrotCMSDataContext类的具体用法?C# CarrotCMSDataContext怎么用?C# CarrotCMSDataContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CarrotCMSDataContext类属于Carrotware.CMS.Data命名空间,在下文中一共展示了CarrotCMSDataContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetAllBlogList

		internal static IQueryable<vw_carrot_Content> GetAllBlogList(CarrotCMSDataContext ctx, Guid siteID) {
			return (from ct in ctx.vw_carrot_Contents
					orderby ct.NavOrder, ct.NavMenuText
					where ct.SiteID == siteID
					 && ct.IsLatestVersion == true
					 && ct.ContentTypeID == ContentPageType.GetIDByType(ContentPageType.PageType.BlogEntry)
					select ct);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:8,代码来源:CannedQueries.cs


示例2: FindPageByTitleAndDate

		internal static IQueryable<vw_carrot_Content> FindPageByTitleAndDate(CarrotCMSDataContext ctx, Guid siteID, string sTitle, string sFileNameFrag, DateTime dateCreate) {
			return (from ct in ctx.vw_carrot_Contents
					orderby ct.NavOrder, ct.NavMenuText
					where ct.SiteID == siteID
					 && ct.IsLatestVersion == true
					 && (ct.PageHead.ToLower() == sTitle.ToLower() || ct.TitleBar.ToLower() == sTitle.ToLower())
					 && ct.FileName.ToLower().Contains(sFileNameFrag.ToLower())
					 && ct.CreateDate.Date == dateCreate.Date
					select ct);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CannedQueries.cs


示例3: GetLatestContentList

		internal static IQueryable<vw_carrot_Content> GetLatestContentList(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly) {
			return (from ct in ctx.vw_carrot_Contents
					orderby ct.NavOrder, ct.NavMenuText
					where ct.SiteID == siteID
					 && ct.IsLatestVersion == true
					 && ct.ContentTypeID == ContentPageType.GetIDByType(ContentPageType.PageType.ContentEntry)
					 && (ct.PageActive == true || bActiveOnly == false)
					 && (ct.GoLiveDate < DateTime.UtcNow || bActiveOnly == false)
					 && (ct.RetireDate > DateTime.UtcNow || bActiveOnly == false)
					select ct);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:11,代码来源:CannedQueries.cs


示例4: FindCommentsByDate

 internal static IQueryable<vw_carrot_Comment> FindCommentsByDate(CarrotCMSDataContext ctx, Guid siteID, Guid rootContentID, DateTime postDate, string postIP, string sCommentText)
 {
     return (from r in ctx.vw_carrot_Comments
             orderby r.CreateDate descending
             where r.SiteID == siteID
                 && r.Root_ContentID == rootContentID
                 && r.CreateDate.Date == postDate.Date
                 && r.CommenterIP == postIP
                 && r.PostComment.Trim() == sCommentText.Trim()
             select r);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:11,代码来源:CannedQueries.cs


示例5: TopLevelPages

		internal static IQueryable<vw_carrot_Content> TopLevelPages(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				DateCompare = DateTime.UtcNow,
				ContentTypeID = ContentPageType.GetIDByType(ContentPageType.PageType.ContentEntry),
				ContentType = ContentPageType.PageType.ContentEntry,
				ActiveOnly = bActiveOnly
			};

			return cqTopLevelPages(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:11,代码来源:CompiledQueries.cs


示例6: GetSnippets

		internal static IQueryable<vw_carrot_ContentSnippet> GetSnippets(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly) {
			return (from ct in ctx.vw_carrot_ContentSnippets
					orderby ct.ContentSnippetName
					where ct.SiteID == siteID
					&& ct.IsLatestVersion == true
					&& (ct.ContentSnippetActive == true || bActiveOnly == false)
					&& (ct.GoLiveDate < DateTime.UtcNow || bActiveOnly == false)
					&& (ct.RetireDate > DateTime.UtcNow || bActiveOnly == false)
					&& ct.IsLatestVersion == true
					select ct);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:11,代码来源:CannedQueries.cs


示例7: Create

		public static CarrotCMSDataContext Create(IDbConnection connection) {
#if DEBUG
			CarrotCMSDataContext _db = new CarrotCMSDataContext(connection);
			DataDiagnostic dd = new DataDiagnostic(_db, iDBConnCounter);
			iDBConnCounter++;
			if (iDBConnCounter > 4096) {
				iDBConnCounter = 0;
			}
			return _db;
#endif
			return new CarrotCMSDataContext(connection);
		}
开发者ID:ithanshui,项目名称:CarrotCakeCMS-MVC,代码行数:12,代码来源:CarrotCMS.cs


示例8: GetLatestContentWithParent

		internal static IQueryable<vw_carrot_Content> GetLatestContentWithParent(CarrotCMSDataContext ctx, Guid siteID, Guid? parentContentID, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				ParentContentID = parentContentID,
				ContentTypeID = ContentPageType.GetIDByType(ContentPageType.PageType.ContentEntry),
				ContentType = ContentPageType.PageType.ContentEntry,
				DateCompare = DateTime.UtcNow,
				ActiveOnly = bActiveOnly
			};

			return cqGetLatestContentWithParent(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:12,代码来源:CompiledQueries.cs


示例9: GetContentCountByParent

		internal static int GetContentCountByParent(CarrotCMSDataContext ctx, Guid siteID, string parentPage, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				ParentFileName = parentPage,
				DateCompare = DateTime.UtcNow,
				ActiveOnly = bActiveOnly
			};

			return cqGetContentCountByParent2(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CompiledQueries.cs


示例10: GetLatestContentBySibling

		internal static IQueryable<vw_carrot_Content> GetLatestContentBySibling(CarrotCMSDataContext ctx, Guid siteID, string sPage, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				FileName = sPage,
				DateCompare = DateTime.UtcNow,
				ActiveOnly = bActiveOnly
			};

			return cqGetLatestContentBySibling2(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CompiledQueries.cs


示例11: GetLatestContentByParent

		internal static IQueryable<vw_carrot_Content> GetLatestContentByParent(CarrotCMSDataContext ctx, Guid siteID, Guid? parentContentID, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				ParentContentID = parentContentID,
				DateCompare = DateTime.UtcNow,
				ActiveOnly = bActiveOnly
			};

			return cqGetLatestContentByParent1(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CompiledQueries.cs


示例12: GetLatestContentByURL

		internal static vw_carrot_Content GetLatestContentByURL(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly, string sPage) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				DateCompare = DateTime.UtcNow,
				ActiveOnly = bActiveOnly,
				FileName = sPage
			};
			return cqGetLatestContentByURL(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:9,代码来源:CompiledQueries.cs


示例13: GetSiteContentCommentsByPostType

 internal static IQueryable<vw_carrot_Comment> GetSiteContentCommentsByPostType(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType contentEntry)
 {
     return (from r in ctx.vw_carrot_Comments
             orderby r.CreateDate descending
             where r.SiteID == siteID
                 && r.ContentTypeID == ContentPageType.GetIDByType(contentEntry)
             select r);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:8,代码来源:CannedQueries.cs


示例14: SearchSeriaCache

		internal static carrot_SerialCache SearchSeriaCache(CarrotCMSDataContext ctx, Guid itemID, string keyType) {
			return SearchSeriaCache(ctx, SiteData.CurrentSiteID, SecurityData.CurrentUserGuid, itemID, keyType);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:3,代码来源:CompiledQueries.cs


示例15: PostsByDateRange

		internal static IQueryable<vw_carrot_Content> PostsByDateRange(CarrotCMSDataContext ctx, Guid siteID, DateTime dateBegin, DateTime dateEnd, bool bActiveOnly) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				DateCompare = DateTime.UtcNow,
				ContentTypeID = ContentPageType.GetIDByType(ContentPageType.PageType.BlogEntry),
				ContentType = ContentPageType.PageType.BlogEntry,
				DateBegin = dateBegin,
				DateEnd = dateEnd,
				ActiveOnly = bActiveOnly
			};

			return cqPostsByDateRange(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:13,代码来源:CompiledQueries.cs


示例16: GetContentByCategoryURL

		internal static IQueryable<vw_carrot_Content> GetContentByCategoryURL(CarrotCMSDataContext ctx, Guid siteID, bool bActiveOnly, string sCatURL) {
			SearchParameterObject sp = new SearchParameterObject {
				SiteID = siteID,
				DateCompare = DateTime.UtcNow,
				FileName = sCatURL,
				ActiveOnly = bActiveOnly
			};

			return cqGetContentByCategoryURL(ctx, sp);
		}
开发者ID:tridipkolkata,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CompiledQueries.cs


示例17: GetWidgetsByRootContent

 internal static IQueryable<carrot_Widget> GetWidgetsByRootContent(CarrotCMSDataContext ctx, Guid rootContentID)
 {
     return (from r in ctx.carrot_Widgets
             where r.Root_ContentID == rootContentID
             select r);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:6,代码来源:CannedQueries.cs


示例18: GetWidgetDataByRootAll

 internal static IQueryable<carrot_WidgetData> GetWidgetDataByRootAll(CarrotCMSDataContext ctx, Guid rootWidgetID)
 {
     return (from r in ctx.carrot_WidgetDatas
             where r.Root_WidgetID == rootWidgetID
             select r);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:6,代码来源:CannedQueries.cs


示例19: GetTemplateCounts

        internal static Dictionary<string, float> GetTemplateCounts(CarrotCMSDataContext ctx, Guid siteID, ContentPageType.PageType pageType)
        {
            Guid contentTypeID = ContentPageType.GetIDByType(pageType);

            return (from ct in ctx.vw_carrot_Contents.Where(c => c.SiteID == siteID && c.ContentTypeID == contentTypeID && c.IsLatestVersion == true)
                    group ct by ct.TemplateFile into grp
                    orderby grp.Count() descending
                    select new KeyValuePair<string, float>(grp.Key, (float)grp.Count()))
                    .ToDictionary(t => t.Key, t => t.Value);
        }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:10,代码来源:CannedQueries.cs


示例20: GetTagURLs

 internal static IQueryable<vw_carrot_TagURL> GetTagURLs(CarrotCMSDataContext ctx, Guid siteID)
 {
     return (from ct in ctx.vw_carrot_TagURLs
             where ct.SiteID == siteID
             select ct);
 }
开发者ID:ninianne98,项目名称:CarrotCakeCMS,代码行数:6,代码来源:CannedQueries.cs



注:本文中的Carrotware.CMS.Data.CarrotCMSDataContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Models.Car类代码示例发布时间:2022-05-24
下一篇:
C# Core.SiteNav类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap