Commit 8adb1945 authored by thienvo's avatar thienvo

fixed sieve filter

parent 42627c04
......@@ -269,7 +269,7 @@ namespace Sieve.Services
}
if (string.IsNullOrEmpty(fullQueryString))
{
fullQueryString = " id > 0";
fullQueryString = " id != null";
}
return fullQueryString;
}
......@@ -379,8 +379,8 @@ namespace Sieve.Services
if (outerExpression == null)
{
var property = Expression.Property(parameterExpression, "id");
ConstantExpression constant = Expression.Constant(0, typeof(int));
var rst = Expression.GreaterThan(property, constant);
ConstantExpression constant = Expression.Constant(new Guid("{00000000-0000-0000-0000-000000000000}"), typeof(Guid));
var rst = Expression.NotEqual(property, constant);
return Expression.Lambda<Func<TEntity, bool>>(rst, parameterExpression);
}
return Expression.Lambda<Func<TEntity, bool>>(outerExpression, parameterExpression);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment