0

以下是否有等价物?

  // convert model to dynamic (this is how the model is coming in)
  IEnumerable<dynamic> dynmodel = (IEnumerable < dynamic >)Model;

  // dynamic lambda ???
  string col = "x.Name";
  var grid = new WebGrid(source: dynmodel.OrderBy(x => @col)); // Doesn't resolve but need an equivalent here!!!
4

1 回答 1

1

有一个名为 Dynamic LINQ 的项目。

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

于 2012-06-05T23:17:15.843 回答