日期:2014-05-18  浏览次数:20955 次

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