首页 新闻 会员 周边

ling 分组输出列表问题,比较纠结,请教!

0
悬赏园豆:20 [已解决问题] 解决于 2015-03-07 14:40

是我自己的问题,结贴!

是我自己的问题,结贴!

鹏城浪子的主页 鹏城浪子 | 初学一级 | 园豆:19
提问于:2015-03-06 23:19
< >
分享
最佳答案
0
public role_info
{
        public int id { get; set; }
        public string title { get; set; }
        public virtual ICollection<news_class> news_classes{ get; set; }
}
public news_class
{
        public int id { get; set; }
        public string title { get; set; }
        public virtual ICollection<news_info> newslist { get; set; }
}
public news_info
{
        public int id { get; set; }
        public string title { get; set; }
        public DateTime datetime { get; set; }
}

 逐层点击展开查询:

db.role_info.Include("news_class").Include("news_info").Where(r=>r.id==xxx);

收获园豆:10
Yu | 专家六级 |园豆:12980 | 2015-03-07 08:38
其他回答(1)
0

 你的需求没完全看懂,就不瞎说了。

问一个问题,如果是SQL语句,你会写吗?

收获园豆:10
爱编程的大叔 | 园豆:30839 (高人七级) | 2015-03-06 23:42
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册