Throw Exception: System.ArgumentNullException:“Value cannot be null. ”
// Type: System.Linq.EnumerableDynamic
// Assembly: Z.Expressions.Eval, Version=4.0.1.0, Culture=neutral, PublicKeyToken=59b66d028979105b
// MVID: 1B08F7D4-0A7D-4667-AB72-4B641D269972
// Assembly location: C:\Users\xx.nuget\packages\z.expressions.eval\4.0.1\lib\netstandard2.1\Z.Expressions.Eval.dll
nuget: System.Linq.Dynamic.Core 1.1.5
[TestClass]
public class Demo
{
[TestMethod]
public void OrderByDynamicTest()
{
IEnumerable<Model> list = new List<Model>()
{
new Model(){ Name = "jack", Age = 44}
};
var orderExpression = "name asc";
var result = list.OrderByDynamic(orderExpression);
Assert.IsNotNull(result);
}
}
public class Model
{
public string Name { get; set; }
public int Age { get; set; }
}
Throw Exception: System.ArgumentNullException:“Value cannot be null. ”
// Type: System.Linq.EnumerableDynamic
// Assembly: Z.Expressions.Eval, Version=4.0.1.0, Culture=neutral, PublicKeyToken=59b66d028979105b
// MVID: 1B08F7D4-0A7D-4667-AB72-4B641D269972
// Assembly location: C:\Users\xx.nuget\packages\z.expressions.eval\4.0.1\lib\netstandard2.1\Z.Expressions.Eval.dll
nuget: System.Linq.Dynamic.Core 1.1.5