EntityFramework-Plus icon indicating copy to clipboard operation
EntityFramework-Plus copied to clipboard

UpdateAsync does not work with EF 7.0.0-rc.1.22426.7

Open haoleanh opened this issue 3 years ago • 2 comments

Here is what to include in your request to make sure we implement a solution as quickly as possible.

1. Description

It seems that EntityType property has been removed in QueryRootExpression class in EF (7.0.0-rc.1.22426.7) but it still use in Z.EntityFramework.Plus.EFCore (7.0.0-preview.7.22376.2-01) https://github.com/dotnet/efcore/blob/v7.0.0-rc.1.22426.7/src/EFCore/Query/QueryRootExpression.cs

2. Exception

Exception message:
Method not found: 'Microsoft.EntityFrameworkCore.Metadata.IEntityType Microsoft.EntityFrameworkCore.Query.QueryRootExpression.get_EntityType()'.
Stack trace:
at Z.EntityFramework.Extensions.BatchUpdate.Execute[T](IQueryable`1 query, Expression`1 updateFactory)
   at BatchUpdateExtensions.UpdateFromQuery[T](IQueryable`1 query, Expression`1 updateFactory, Action`1 batchUpdateBuilder)
   at Z.EntityFramework.Plus.BatchUpdateExtensions.Update[T](IQueryable`1 query, Expression`1 updateFactory, Action`1 batchUpdateBuilder)
   at Z.EntityFramework.Plus.BatchUpdateExtensions.<>c__DisplayClass8_0`1.<UpdateAsync>b__0()

haoleanh avatar Sep 21 '22 07:09 haoleanh

Hello @haoleanh ,

The support for RC1 is coming next week. Meanwhile our library is only compatible with preview 7.

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 avatar Sep 21 '22 13:09 JonathanMagnan

@JonathanMagnan Nice, cant wait and thanks for quick response :)

haoleanh avatar Sep 22 '22 01:09 haoleanh

Hello @haoleanh ,

A new version has been released, which should now support the RC1.

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

Best Regards,

Jon


Is this library useful to you? Please help us by becoming a sponsor to keep it alive and supported.

JonathanMagnan avatar Sep 26 '22 19:09 JonathanMagnan

@JonathanMagnan the latest version fixed the issue. Thanks for the help :)

haoleanh avatar Sep 27 '22 06:09 haoleanh