zzzprojects / EntityFramework-Plus

Entity Framework Plus extends your DbContext with must-haves features: Include Filter, Auditing, Caching, Query Future, Batch Delete, Batch Update, and more
https://entityframework-plus.net/
MIT License
2.27k stars 318 forks source link

Strange error after updating .Net to 8.0 Preview 7 #775

Closed srdjo closed 1 year ago

srdjo commented 1 year ago

After updating the Blazor Server project from .Net Preview 7 to Preview 8 I am getting a strange error

Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] Unhandled exception in circuit '4frI1lrCAF33gHyoMx1xi36umIsBr5tIYzZncPMxIl4'. System.MissingMethodException: Method not found: 'System.Collections.Generic.IEnumerable1<Microsoft.EntityFrameworkCore.Metadata.IProperty> Microsoft.EntityFrameworkCore.Metadata.IEntityType.GetProperties()'. at Z.EntityFramework.Extensions.BatchUpdate.Execute[T](IQueryable1 query, Expression1 updateFactory) at BatchUpdateExtensions.UpdateFromQuery[T](IQueryable1 query, Expression1 updateFactory, Action1 batchUpdateBuilder) at Z.EntityFramework.Plus.BatchUpdateExtensions.Update[T](IQueryable1 query, Expression1 updateFactory, Action1 batchUpdateBuilder) at Z.EntityFramework.Plus.BatchUpdateExtensions.Update[T](IQueryable1 query, Expression`1 updateFactory)

I have the Latest prerelease 8.0.0-preview.5.23280.1-02 of Z.EntityFramework.Extensions.EFCore installed.

What might be the problem ?

JonathanMagnan commented 1 year ago

Hello @srdjo ,

At this moment, we only support up to EF Core 8 - Preview 6,

We already have a branch that supports Preview 7 which will be released tomorrow or, more likely next week.

The problem is due that EF Core preview 7 moved/renamed a few methods that we were using.

Best Regards,

Jon


Sponsorship Help us improve this library

Performance Libraries context.BulkInsert(list, options => options.BatchSize = 1000); Entity Framework ExtensionsDapper Plus

Runtime Evaluation Eval.Execute("x + y", new {x = 1, y = 2}); // return 3 C# Eval Function

JonathanMagnan commented 1 year ago

Hello @srdjo ,

The latest version released today should now support the Preview 7: https://www.nuget.org/packages/Z.EntityFramework.Plus.EFCore/8.0.0-preview.7.23375.4-01

If you have the chance to try it, let us know if everything is now working as expected.

Best Regards,

Jon


Are you finding this library useful? If so, please consider supporting its continued development by becoming a sponsor.

Additionally, if you think your enterprise would benefit from this library, we encourage you to suggest they become a sponsor as well. Your support will help ensure this library remains alive and well-supported.

srdjo commented 1 year ago

It works great. Thanks a lot