⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 article.cs

📁 Maolz个人展示网站源码,全部的代码,.net
💻 CS
字号:
using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;

namespace SubSonic.Generated
{
    using System.Linq;
	public partial class Article
	{
        public string GetTags()
        {
            if (GetTagCollection().Count == 0)
                return string.Empty;
            string temp = string.Empty;
            foreach (Tag t in GetTagCollection())
            {
                temp += t.Name + ",";
            }
            return temp.Substring(0, temp.Length - 1);
        }
        public string GetCategoryNames() 
        {
            if (this.GetCategoryCollection().Count == 0)
                return string.Empty;
            
            System.Collections.Generic.List<string> list=new List<string>();
            GetCategoryCollection().ForEach(t => list.Add(t.Name));
            return String.Join(",", list.ToArray());
        }
        public CommentCollection GetCommentCollection() 
        {
            //Query qry = Comment.CreateQuery().WHERE(Comment.Columns.FkArticleId, this.PKId).ORDER_BY(Comment.Columns.PKId, "asc");
            //Commentqry.ExecuteReader
            return DB.Select().From<Comment>().Where(Comment.Columns.FkArticleId).IsEqualTo(this.PKId).ExecuteAsCollection<CommentCollection>().OrderByAsc(Comment.Columns.PKId);
        }
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -