温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Maolz个人展示网站源码
当前文件:
maolz/SubSonicDAL/MySiteProvider/Custom/Article.cs[1K,2009-6-12 11:47:17],打开代码结构图
maolz/SubSonicDAL/MySiteProvider/Custom/Article.cs[1K,2009-6-12 11:47:17],打开代码结构图1using System; 2
using System.Text; 3
using System.Data; 4
using System.Data.SqlClient; 5
using System.Data.Common; 6
using System.Collections; 7
using System.Collections.Generic; 8
using System.ComponentModel; 9
using System.Configuration; 10
using System.Xml; 11
using System.Xml.Serialization; 12
using SubSonic; 13
using SubSonic.Utilities; 14
15
namespace SubSonic.Generated 16
{ 17
using System.Linq; 18
public partial class Article 19
{ 20
public string GetTags() 21
{ 22
if (GetTagCollection().Count == 0) 23
return string.Empty; 24
string temp = string.Empty; 25
foreach (Tag t in GetTagCollection()) 26
{ 27
temp += t.Name + ","; 28
} 29
return temp.Substring(0, temp.Length - 1); 30
} 31
public string GetCategoryNames() 32
{ 33
if (this.GetCategoryCollection().Count == 0) 34
return string.Empty; 35
36
System.Collections.Generic.List<string> list=new List<string>(); 37
GetCategoryCollection().ForEach(t => list.Add(t.Name)); 38
return String.Join(",", list.ToArray()); 39
} 40
public CommentCollection GetCommentCollection() 41
{ 42
//Query qry = Comment.CreateQuery().WHERE(Comment.Columns.FkArticleId, this.PKId).ORDER_BY(Comment.Columns.PKId, "asc"); 43
//Commentqry.ExecuteReader 44
return DB.Select().From<Comment>().Where(Comment.Columns.FkArticleId).IsEqualTo(this.PKId).ExecuteAsCollection<CommentCollection>().OrderByAsc(Comment.Columns.PKId); 45
} 46
} 47
48
} 49
50






}
}