Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite max error when no record #9595

Closed
oteyazilim opened this issue Aug 27, 2017 · 1 comment
Closed

sqlite max error when no record #9595

oteyazilim opened this issue Aug 27, 2017 · 1 comment

Comments

@oteyazilim
Copy link

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

@ajcvickers
Copy link
Contributor

Duplicate of #9570

@ajcvickers ajcvickers marked this as a duplicate of #9570 Aug 30, 2017
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants