- public class User_InfoRepository : XXBBase
- {
- /// <summary>
- /// 需要把Join的表关系写在这里
- /// </summary>
- /// <returns></returns>
- public IQueryable<User_Info> GetDetailModel()
- {
- var linq = from data1 in base.GetModel<User_Info>()
- join data2 in base.GetModel<User_Profile>() on data1.UserID equals data2.UserID
- select data1;
- return linq;
- }
- }
原文链接:http://www.cnblogs.com/lori/archive/2012/08/23/2653426.html