我的sql代码如下:
@H_404_2@select UserId,UserName
from aspnet_Users
where UserId not in (select UsersId from tbluser where active='true')
什么是等效的linq表达式?
解决方法
我第一次尝试在C#中使用LiNQ
@H_404_2@var result = from y in aspnet_Users
where !(
from x in tblUser
where x.active == "true"
select x.UsersID
).Contains(y.UserId)
select y;
-- OR // select new { y.UserId,y.UserName};
资源