我有三个表创建为这样:有一个多对多的LINQ遇到问题选择
我想什么做的就是选择其中一个AdministratorAttendee记录存在一个给定的AttendeeId与会者和AdministratorId。
我已经试过是这样的:
var result = (from a in dc.Attendees
from aa in dc.AdministratorAttendees
where aa.AdministratorId == this.CurrentAdminId && a.AttendeeId == _attendee.AttendeeId
select a);
但是,尽管与会者,管理员和AdministratorAttendee记录存在指定ID的事实,它返回任何结果。
什么是正确的linq查询使用?
感谢
'this'指的是什么?目前的对象是什么? – SAJ14SAJ
当前页面类。基本上CurrentAdminId和_attendee.AttendeeId是两个参数 – alimac83
什么是id字段的类型? –