Fixed .OrderBy with single properties which are implemented as actual properties (e.g. Level, CreateDate, UpdateDate) - dynamic properties should have ordered correctly
This commit is contained in:
@@ -166,6 +166,10 @@ namespace System.Linq.Dynamic
|
||||
{
|
||||
value = (firstFuncResult as Func<DynamicNode, object>)(node);
|
||||
}
|
||||
if (firstFuncResult.GetType().IsValueType)
|
||||
{
|
||||
value = firstFuncResult;
|
||||
}
|
||||
return value;
|
||||
}).AsQueryable();
|
||||
}
|
||||
@@ -179,6 +183,10 @@ namespace System.Linq.Dynamic
|
||||
{
|
||||
value = (firstFuncResult as Func<DynamicNode, object>)(node);
|
||||
}
|
||||
if (firstFuncResult.GetType().IsValueType)
|
||||
{
|
||||
value = firstFuncResult;
|
||||
}
|
||||
return value;
|
||||
}).AsQueryable();
|
||||
}
|
||||
@@ -1101,8 +1109,8 @@ namespace System.Linq.Dynamic
|
||||
var not = Expression.Not(Expression.TypeAs(invokedExpr, typeof(Nullable<bool>)));
|
||||
expr = Expression.Lambda<Func<DynamicNode, bool>>(
|
||||
Expression.Condition(
|
||||
Expression.Property(not, "HasValue"),
|
||||
Expression.Property(not, "Value"),
|
||||
Expression.Property(not, "HasValue"),
|
||||
Expression.Property(not, "Value"),
|
||||
Expression.Constant(false, typeof(bool))
|
||||
), parameters);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user