-
Notifications
You must be signed in to change notification settings - Fork 166
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
Running FirstOrDefaultAsync with AsExpandable gives the error #49
Comments
You need this nuget : |
The error could be to download the NuGet. Could we do that? |
@Thorium Sorry ? |
By the Nuget package download statics we can expect that only 10% of the users use these new versions where the async is broken. So this issue will be hit about 50 000 times by different users in the future. So we could improve the user experience of this non-ef-version by: a) loading the EF reference by reflection if the dll is present in the current folder. Then it could work? |
I see your point. The problem is that there are two version from EntityFramework : the old one, and the .Net Core one. That's the reason I've created three separate projects. a) I'm not sure if that's possible because you don't know if you are using EntityFramework or Microsoft.EntityFrameworkCore
|
I still don't know if this is a problem or not, but I'd kind of like the non-ef-version to be named LinqKit.Core as many other .NET projects use this Core-naming to be not-the-dotnet-core but the-basic-core-functionality library (castle.core, system.reactive.core, sqlite.core, ...). |
Proposals:
|
Sounds good. I would vote for unlisting LinqKit.EntityFramework from NuGet when this is done. What is your opinion on EF6 future anyways? It seems that "EntityFramework" is the 6.1.3 and EF7 won't be "EntityFramework" but something else ("Microsoft.EntityFrameworkCore.SqlServer") and the Nuget id of "EntityFramework" will stay in that code base. Maybe I would drop "Microsoft" from "LinqKit.Microsoft.EntityFrameworkCore" because this is not a Microsoft maintained project. |
Hi @Thorium, I've another (radical) proposal for fixing compatibility issues as discussed in this thread and #14. Create a new version from LinqKit which throws an exception on all extension methods. The exception message should be like:
At the time, post a new LinqKit.Core to NuGet which replaces the functionality from LinqKit. And maybe delete all other versions from LinqKit except the last one? This proposal is in line with some decisions made by Microsoft : https://github.com/dotnet/standard/blob/master/docs/faq.md#will-there-be-tooling-to-highlight-apis-that-dont-work-everywhere I'll make a PR so you can review code changes. |
Fixed by #52 Issue will be closed. @atul221282 use latest nuget pacakges for testing. |
Ok guys I will give it a try |
Hi Guys I am running following code and gives an error
static Expression<Func<string, bool>> condition = a => a != null;
var expanded = condition.Expand();
var quee = this.riskRepository.Query().AsExpandable().Where(x => expanded.Invoke(x.PurchaseNumber) && x.AMD_Seq_Num == seqNum).FirstOrDefaultAsync();
Whereas this works fine Note using non async method workds fine
var expanded = condition.Expand();
var quee = this.riskRepository.Query().AsExpandable().Where(x => expanded.Invoke(x.PurchaseNumber) && x.AMD_Seq_Num == seqNum).FirstOrDefault();
The text was updated successfully, but these errors were encountered: