NHibernate Linq 的 join (联合查询) 的例子
摘要:
1. 如果一个表中的id为非空而另一个表的id为可空 如何链接 var q = from o in db.Orders join e in db.Employees on o.Employee.EmployeeId equals (int?) e.EmployeeId into emps from e in emps select new {o.OrderId, e.FirstName};2. 用where连接 var q = from e1 in db.Employees from e2 in e1.Subordinates where e1.Address.City == e2.Addre 阅读全文
posted @ 2011-01-17 04:47 脚上的奇迹 阅读(1188) 评论(0) 推荐(0) 编辑