linq2db / linq2db.EntityFrameworkCore

Bring power of Linq To DB to Entity Framework Core projects
MIT License
462 stars 38 forks source link

Can not find private property 'RelationalQueryContextFactory._dependencies' in EF Core rc2 #190

Closed Mitch528 closed 2 years ago

Mitch528 commented 2 years ago

After upgrading to EF Core rc2, I am encountering the following exception:

LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsException: Can not find private property 'RelationalQueryContextFactory._dependencies' in current EFCore Version.
   at LinqToDB.EntityFrameworkCore.LinqToDBForEFToolsImplDefault.GetCurrentContext(IQueryable query)
   at LinqToDB.EntityFrameworkCore.LinqToDBForEFTools.ToLinqToDB[T](IQueryable`1 query)
   at LinqToDB.EntityFrameworkCore.LinqToDBForEFExtensions.ToListAsyncLinqToDB[TSource](IQueryable`1 source, CancellationToken token)

Packages: linq2db - 3.5.0 linq2db.EntityFrameworkCore - 6.4.0 Microsoft.EntityFrameworkCore - 6.0.0-rc.2.21480.5 Pomelo.EntityFrameworkCore.MySql - 6.0.0-rc.1.ci.20211007223757

MaceWindu commented 2 years ago

Caused by this change https://github.com/dotnet/efcore/pull/25465

sdanyliv commented 2 years ago

Actually fix is easy, but looks like Pomelo provider also is not ready for this RC2.

sid-6581 commented 2 years ago

Will there be a new release with this fix when .NET 6 is released on November 9?

sdanyliv commented 2 years ago

We have released new version. But Pomelo still not ready.

Mitch528 commented 2 years ago

We have released new version. But Pomelo still not ready.

Pomelo is ready now but now there's a new problem, will create a new issue.