Commit 42627c04 authored by thienvo's avatar thienvo

uuid

parent ed9a83e8
...@@ -167,7 +167,7 @@ namespace Sieve.Services ...@@ -167,7 +167,7 @@ namespace Sieve.Services
//string dynamicQuery = ""; //string dynamicQuery = "";
if (model?.GetFiltersParsed() == null) if (model?.GetFiltersParsed() == null)
{ {
return " id > 0"; return " id != null";
} }
//Expression outerExpression = null; //Expression outerExpression = null;
...@@ -299,8 +299,8 @@ namespace Sieve.Services ...@@ -299,8 +299,8 @@ namespace Sieve.Services
if (model?.GetFiltersParsed() == null) if (model?.GetFiltersParsed() == null)
{ {
var property = Expression.Property(parameterExpression, "id"); var property = Expression.Property(parameterExpression, "id");
ConstantExpression constant = Expression.Constant(this.ChangeType(0, property.Type), property.Type); ConstantExpression constant = Expression.Constant(new Guid("{00000000-0000-0000-0000-000000000000}"), typeof(Guid));
var rst = Expression.GreaterThan(property, constant); var rst = Expression.NotEqual(property, constant);
return Expression.Lambda<Func<TEntity, bool>>(rst, parameterExpression); return Expression.Lambda<Func<TEntity, bool>>(rst, 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