📌  相关文章
📜  'System.Linq.Dynamic.ExpressionParser' 的类型初始化程序引发了异常. - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:44.276000             🧑  作者: Mango

代码示例1
I'm also using Core 2.0 and was using System.Linq.Dynamic and got that error when I used an OrderBy extension, but I uninstalled it and installed System.Linq.Dynamic.Core instead, and now it's working perfectly


var data = (from app in _context.Applications select app);

//Sorting  
if (!(string.IsNullOrEmpty(sortColumn) && string.IsNullOrEmpty(sortColumnDir)))
{ 
    data = data.OrderBy(sortColumn + " " + sortColumnDir);
}