【问题标题】:Dynamic model query for orderBy()orderBy() 的动态模型查询
【发布时间】:2012-06-05 23:13:52
【问题描述】:

以下是否有等价物?

  // 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!!!

【问题讨论】:

    标签: asp.net-mvc asp.net-mvc-3 c#-4.0 lambda


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 2017-07-30
    • 1970-01-01
    • 1970-01-01
    • 2021-03-03
    • 1970-01-01
    • 2012-09-14
    • 2013-08-07
    • 2014-11-21
    相关资源
    最近更新 更多