You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading my application netcore 2.0 I've started to get following error at this line:
var max = await _db.Invoices.Where(x=>x.Type == InvoiceType.Sell || x.Type == InvoiceType.PurchaseReturn).MaxAsync(x=>x.No);
"InvalidOperationException: Warning as error exception for warning 'Microsoft.EntityFrameworkCore.Query.QueryClientEvaluationWarning': The LINQ expression 'Max()' could not be translated and will be evaluated locally. To suppress this Exception use the DbContextOptionsBuilder.ConfigureWarnings API. ConfigureWarnings can be used when overriding the DbContext.OnConfiguring method or using AddDbContext on the application service provider."
Then I reenabled client evaluation. This time my new error was this:
"InvalidOperationException: Sequence contains no elements."
After upgrading my application netcore 2.0 I've started to get following error at this line:
var max = await _db.Invoices.Where(x=>x.Type == InvoiceType.Sell || x.Type == InvoiceType.PurchaseReturn).MaxAsync(x=>x.No);
"InvalidOperationException: Warning as error exception for warning 'Microsoft.EntityFrameworkCore.Query.QueryClientEvaluationWarning': The LINQ expression 'Max()' could not be translated and will be evaluated locally. To suppress this Exception use the DbContextOptionsBuilder.ConfigureWarnings API. ConfigureWarnings can be used when overriding the DbContext.OnConfiguring method or using AddDbContext on the application service provider."
Then I reenabled client evaluation. This time my new error was this:
"InvalidOperationException: Sequence contains no elements."
It seems somethings not right in new version.
My Environment:
dotnet --info
.NET Command Line Tools (2.0.0)
Product Information:
Version: 2.0.0
Commit SHA-1 hash: cdcd1928c9
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.12
OS Platform: Darwin
RID: osx.10.12-x64
Base Path: /usr/local/share/dotnet/sdk/2.0.0/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
The text was updated successfully, but these errors were encountered: