首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

linq 添加自定义参数有关问题

2012-08-17 
linq 添加自定义参数问题string tempif(keynone)temp && keyskey var ms from n in CC_ wh

linq 添加自定义参数问题
string temp="";
if(key='none')
  temp=" && keys==key ";

var ms = from n in CC_ where n.customer_code == keys && n.sales_account == sales temp orderby n.customer_name select n;

高人指点怎么添加自定义参数

[解决办法]
dynamic linq:

http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx

热点排行