日期:2014-05-20  浏览次数:21112 次

linq 多表关联.
有TableA 和 TableB 两张表

我想查询A表中的 A1,A2, 和 B表中的 B1,B2字段,请问我应该如何完善或修改下面的语句呢?

var list = from c in DB.TableA
  join a in DB.TableBon c.UserID equals a.ID
  where c.UserID == UserId && c.CreateTime >= tmFrom & c.StartTime <= tmTo
  orderby c.StartTime
  select new();

------解决方案--------------------
不知所云。。。