我的代码中有这个:
@model Tuple<IEnumerable<dynamic>, IEnumerable<dynamic>, IEnumerable<dynamic>>
@(Html.Telerik().Grid(Model.Item3)
.Name("Grid")
.DataKeys(keys => keys.Add(c => c.Id))
)
我得到了错误:表达式树可能不包含动态操作。
这是控制器代码:
FirstClass firstC= new FirstClass ();
IEnumerable<dynamic> first= firstC.All();
SecondClass secondC= new SecondClass ();
IEnumerable<dynamic> second= secondC.All();
ThirdClass thirdc = new ThirdClass ();
IEnumerable<dynamic> third= thirdc .All();
Tuple<IEnumerable<dynamic>, IEnumerable<dynamic>, IEnumerable<dynamic>> result =
new Tuple<IEnumerable<dynamic>, IEnumerable<dynamic>, IEnumerable<dynamic>>(firstC, secondC, thirdc );
return View(result);
如何解决这个问题?