使用ef core mysql创建dbcontext错误?

使用ef core mysql创建dbcontext错误?,mysql,entity-framework-core,Mysql,Entity Framework Core,错误详细信息, 创建数据库上下文,帮助 mysql版本8 System.TypeLoadException: Method 'Create' in type 'MySql.Data.EntityFrameworkCore.Query.Internal.MySQLSqlTranslatingExpressionVisitorFactory' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.21.0, Culture=neutra

错误详细信息, 创建数据库上下文,帮助

mysql版本8

System.TypeLoadException: Method 'Create' in type 'MySql.Data.EntityFrameworkCore.Query.Internal.MySQLSqlTranslatingExpressionVisitorFactory' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.21.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.
   at MySql.Data.EntityFrameworkCore.Extensions.MySQLServiceCollectionExtensions.AddEntityFrameworkMySQL(IServiceCollection services)
   at MySql.Data.EntityFrameworkCore.Infrastructure.Internal.MySQLOptionsExtension.ApplyServices(IServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>g__BuildServiceProvider|3()
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c__DisplayClass4_0.<GetOrAdd>b__2(Int64 k)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
   at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)
   at Zurich.Domain.Core.ZurichDbContext..ctor(DbContextOptions`1 contextOptions) in /Users/leo/repos/Zurich/src/Zurich.Domain/Core/ZurichDbContext.cs:line 15
   at Zurich.Autofac.Test.Tests.GeneratorDbContext() in /Users/leo/repos/Zurich/test/Zurich.Autofac.Test/UnitTest1.cs:line 33
System.TypeLoadException:程序集“MySql.Data.EntityFrameworkCore.Query.Internal.mysqlTranslatingExpressionVisitorFactory”中类型“MySql.Data.EntityFrameworkCore,Version=8.0.21.0,Culture=neutral,PublicKeyToken=c5687fc88969c44d”中的方法“Create”没有实现。
位于MySql.Data.EntityFrameworkCore.Extensions.MySQLServiceCollectionExtensions.AddEntityFrameworkMySQL(IServiceCollection服务)
位于MySql.Data.EntityFrameworkCore.Infrastructure.Internal.MySQLOptionsExtension.ApplyServices(IServiceCollection服务)
位于Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions选项,ServiceCollection服务)
在Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.c_uDisplayClass4_0.g_uBuildServiceProvider|3()中
在Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.c__DisplayClass4_0.b_2(Int64 k)中
位于System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey,Func`2 valueFactory)
位于Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions选项,布尔providerRequired)
位于Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions)
在/Users/leo/repos/Zurich/src/Zurich.Domain/Core/ZurichDbContext.cs中的Zurich.Domain.Core.ZurichDbContext..ctor(DbContextOptions`1 contextOptions)中:第15行
在/Users/leo/repos/Zurich/Test/Zurich.Autofac.Test/UnitTest1.cs中的Zurich.Autofac.Test.Tests.GeneratorDbContext()中:第33行