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

EFCore 6 support (Method not found exception) #10

Closed
luizhlelis opened this issue Jun 6, 2022 · 1 comment
Closed

EFCore 6 support (Method not found exception) #10

luizhlelis opened this issue Jun 6, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@luizhlelis
Copy link
Collaborator

In EFCore 6, the ModelExtensions class suffered many updates, and the FindEntityType method was turned obsolete. You're using it here. The following error is thrown when using Ziggurat with EFCore 6:

Method not found: 'Microsoft.EntityFrameworkCore.Metadata.IEntityType Microsoft.EntityFrameworkCore.ModelExtensions.FindEntityType(Microsoft.EntityFrameworkCore.Metadata.IModel, System.Type)'.
 ---> System.MissingMethodException: Method not found: 'Microsoft.EntityFrameworkCore.Metadata.IEntityType Microsoft.EntityFrameworkCore.ModelExtensions.FindEntityType(Microsoft.EntityFrameworkCore.Metadata.IModel, System.Type)'.
   at DotNetCore.CAP.Internal.SubscribeInvoker.InvokeAsync(ConsumerContext context, CancellationToken cancellationToken)
   at DotNetCore.CAP.Internal.SubscribeDispatcher.InvokeConsumerMethodAsync(MediumMessage message, ConsumerExecutorDescriptor descriptor, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at DotNetCore.CAP.Internal.SubscribeInvoker.InvokeAsync(ConsumerContext context, CancellationToken cancellationToken)
   at DotNetCore.CAP.Internal.SubscribeDispatcher.InvokeConsumerMethodAsync(MediumMessage message, ConsumerExecutorDescriptor descriptor, CancellationToken cancellationToken)

Take a look at other packages that faced similar issues:

EFCore.BulkExtensions
AutoMapper.Collection.EFCore

@rafaelpadovezi
Copy link
Owner

Thanks for bringing this issue to my attention @luizhlelis. Added support for net6 fo Ziggurat, which enables usings CAP 6.0.* and EF Core 6.0.*
The changes were shipped on the 1.0.0 version (without the beta suffix)

@rafaelpadovezi rafaelpadovezi added the enhancement New feature or request label Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants