urfnet / URF.Core

Unit of Work & Repositories Framework - .NET Core, NET Standard, Entity Framework Core. 100% extensible & lightweight.
https://github.com/urfnet
MIT License
309 stars 62 forks source link

Fix Where Clause LINQ expression Queryable could not be translated. #67

Closed ozturkfatih closed 4 years ago

ozturkfatih commented 4 years ago

Prior to version 3.0, Entity Framework Core supported client evaluation anywhere in the query. The LINQ expression 'DbSet .Take(__p_0) .Where(e => e.UnitPrice > 15)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

CompareTo(Decimal) usage https://docs.microsoft.com/en-us/dotnet/api/system.decimal.compareto?view=netcore-3.1