📄 article.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 + -