0
请构成了MySQL查询LINQ查询SQL到LINQ转换与NOT IN
select a.name ,a.amount
from acount as a
where a.acountid NOT IN (select c.id from saving as c where c.userid="x")
and a.userid="x";
X=1;
请帮我 感谢
请构成了MySQL查询LINQ查询SQL到LINQ转换与NOT IN
select a.name ,a.amount
from acount as a
where a.acountid NOT IN (select c.id from saving as c where c.userid="x")
and a.userid="x";
X=1;
请帮我 感谢
可言,但在东西这些行应该工作没有测试.. 。
var query =
from a in db.Account
where !(from s in db.Savings
where s.UserId == "x"
select s.id)
.Contains(a.AccountId)
&& a.UserId == "x"
select new { a.Name, a.Amount };
非常感谢它:)... – Anjana 2012-07-15 18:13:48
你需要这个查询的linq表达式吗? – 2012-07-15 17:03:50
是的,我需要一个LINQ表达式 – Anjana 2012-07-15 17:59:23