日期:2014-05-20  浏览次数:20694 次

看看
select MenuName from vm_sys_Menu where MenuID not in(73)
帮我把这条sql语句转成下面的这么linq 
var result = (from a in dc.VM_SYS_Menu
  where a.MenuID == id
  select a).Single();


------解决方案--------------------
C# code

var queryResult = (from a in dc.VM_SYS_Menu
where ! (new int?[] {73}).Contains(a.MenuID)
select a).Single();

------解决方案--------------------
var result = (from a in dc.VM_SYS_Menu
where a.MenuID != 73
select a).Single();

------解决方案--------------------
探讨
select MenuName from vm_sys_Menu where MenuID not in(73)
帮我把这条sql语句转成下面的这么linq
var result = (from a in dc.VM_SYS_Menu
where a.MenuID == id
select a).Single();