Asp.net源码专业站
首页->博客空间->Maolz个人展示网站源码>>SubSonicDAL/MySiteProvider/Custom/Article.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Maolz个人展示网站源码
当前文件:文件类型 maolz/SubSonicDAL/MySiteProvider/Custom/Article.cs[1K,2009-6-12 11:47:17]打开代码结构图
普通视图
		            
1using System; 2using System.Text; 3using System.Data; 4using System.Data.SqlClient; 5using System.Data.Common; 6using System.Collections; 7using System.Collections.Generic; 8using System.ComponentModel; 9using System.Configuration; 10using System.Xml; 11using System.Xml.Serialization; 12using SubSonic; 13using SubSonic.Utilities; 14 15namespace 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
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:Maolz个人展示网站源码
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146