当前位置: 首页>>代码示例>>C#>>正文


C# Data.BlogDataDataContext类代码示例

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


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

示例1: Delete

 /// <summary>
 /// 删除记录
 /// </summary>
 /// <param name="GroupId"></param>
 public static void Delete(int GroupId)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Groups.Single(p => p.Group_Id == GroupId);
     BD.Weblog_Groups.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_Group.cs

示例2: GetUserDomainByLogID

 /// <summary>
 /// 根据logid来获取用户域名
 /// </summary>
 /// <param name="logId">日记ID</param>
 /// <returns></returns>
 public static string GetUserDomainByLogID(int logId)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     //string domain = "";
     //int userId = -1;
     Weblog_Log temp = null;
     var WL = BD.Weblog_Logs.Where(p => p.Log_Id == logId);
     if (WL.Count() > 0)
     {
         temp = WL.First();
         var WU = BD.Weblog_Users.Where(p => p.User_Id == temp.Log_UserId);
         if (WU.Count() > 0)
         {
             return WU.First().User_DomainName;
         }
         else
         {
             return "";
         }
     }
     else
     {
         return "";
     }
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:30,代码来源:BWeblog_User.cs

示例3: Delete

 /// <summary>
 /// 删除记录
 /// </summary>
 /// <param name="CssId"></param>
 public static void Delete(int CssId)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_UserCsses.Single(p => p.UserCss_Id == CssId);
     BD.Weblog_UserCsses.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_UserCss.cs

示例4: InsertRssLink

 /// <summary>
 /// 插入新的RssLink
 /// </summary>
 /// <param name="WURL"></param>
 public static bool InsertRssLink(Weblog_UserRssLink WURL)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     BD.Weblog_UserRssLinks.InsertOnSubmit(WURL);
     BD.SubmitChanges();
     return true;
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_UserRssLink.cs

示例5: Delete

 /// <summary>
 /// 删除主题
 /// </summary>
 /// <param name="Id"></param>
 public static void Delete(int Id)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Themes.Single(p => p.Theme_Id == Id);
     BD.Weblog_Themes.DeleteOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:11,代码来源:BWeblog_Theme.cs

示例6: GetAll

 public static IEnumerable<View_WeblogUserRecommend> GetAll()
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     return BD.View_WeblogUserRecommends.OrderByDescending(p=>p.Recommend_Id);
 
 
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BView_WeblogUserRecommend.cs

示例7: GetByPageIndex

 public static IEnumerable<View_WeblogUserRecommend> GetByPageIndex(Int32 PageIndex,Int32 Length)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     
     return BD.View_WeblogUserRecommends.Where(p=>p.Recommend_ThemeId==PageIndex).OrderByDescending(p=>p.Recommend_CreateTime);
 
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BView_WeblogUserRecommend.cs

示例8: Edit

 public static void Edit(Weblog_Recommend WR)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
    var temp= BD.Weblog_Recommends.Single(p=>p.Recommend_Id==WR.Recommend_Id);
    temp.Recommend_LogId = WR.Recommend_LogId;
    BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BWeblog_Recommend.cs

示例9: SearchByXH

        //通过学号选
        public static IEnumerable<View_WeblogUserXSJBXX> SearchByXH(string XH)
        {
            BlogDataDataContext BD = new BlogDataDataContext();
            //return BD.View_WeblogUserXSJBXXes.Single(p=>p.XH==XH);
            return BD.View_WeblogUserXSJBXXes.Where(p => p.XH == XH);

        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BView_WeblogUserXSJBXX.cs

示例10: DeleteById

 public static void DeleteById(int Id)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_CssFiles.Where(p => p.CssFile_Id == Id);
     BD.Weblog_CssFiles.DeleteAllOnSubmit(temp);
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:7,代码来源:BWeblog_CssFile.cs

示例11: GetAllPaged

        /// <summary>
        /// myself:要利用Linq2Sql的延迟
        /// </summary>
        /// <param name="PageIndex"></param>
        /// <param name="Length"></param>
        /// <param name="Count"></param>
        /// <returns></returns>
        public static IEnumerable<Weblog_User> GetAllPaged(int PageIndex, int Length, out int Count)
        {
            BlogDataDataContext BD = new BlogDataDataContext();
            var users = BD.Weblog_Users.Select(p => p).Where(p => p.User_TxzId < 200000).OrderByDescending(p => p.CreateTime);

            Count = users.Count();
            return users.Skip((PageIndex - 1) * Length).Take(Length);
        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:15,代码来源:BWeblog_User.cs

示例12: CheckExist

 public static bool CheckExist(int Id)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     if (BD.Weblog_CssFiles.Where(p => p.CssFile_Id == Id).Count() == 1)
         return true;
     else
         return false;
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BView_WeblogThemeCssFile.cs

示例13: Update

 /// <summary>
 /// 修改主题
 /// </summary>
 /// <param name="WT"></param>
 public static void Update(Weblog_Theme WT)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     var temp = BD.Weblog_Themes.Single(p => p.Theme_Id == WT.Theme_Id);
     temp.Theme_Intro = WT.Theme_Intro;
     temp.Theme_Name = WT.Theme_Name;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:12,代码来源:BWeblog_Theme.cs

示例14: Insert

        public static bool  Insert(Weblog_RecommendTheme WRT)
        {
            BlogDataDataContext BD = new BlogDataDataContext();
            BD.Weblog_RecommendThemes.InsertOnSubmit(WRT); 
            BD.SubmitChanges();
            return true;

        }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BWeblog_RecommendTheme.cs

示例15: Edit

 public static void Edit(Weblog_Notice WN)
 {
     BlogDataDataContext BD = new BlogDataDataContext();
     Weblog_Notice notice = BD.Weblog_Notices.Where(p => p.Notice_Type == 1).First();
     notice.Notice_Content = System.Web.HttpContext.Current.Server.HtmlEncode(WN.Notice_Content).Replace("\n", "<br />");
     notice.Notice_CreateTime = DateTime.Now;
     BD.SubmitChanges();
 }
开发者ID:LittlePeng,项目名称:ncuhome,代码行数:8,代码来源:BWeblog_Notice.cs


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