我有3张表
Person
--------
personname
student
-------
studentid
address
personid
teacher
--------
teacherid
address
personid
我的linq查询是
var p=from p in db.person
join s in db.student
on p.personid equals s.personid
join t in db.teacher
on p.personid equals t.personid
select {address=????};
如何选择学生和教师地址到一个字段????
答案 0 :(得分:0)
select new { address = s.address + " " + t.address };
这应该有效 - 用您喜欢的任何分隔符更改“”。