dotnet ef migrations add InitialMigration
Run Code Online (Sandbox Code Playgroud)
来自程序集“Pomelo.EntityFrameworkCore.MySql,版本=3.2.3.0,Culture=neutral,PublicKeyToken=2cc498582444921b”的“Pomelo.EntityFrameworkCore.MySql.Query.ExpressionVisitors.Internal.MySqlSqlTranslatingExpressionVisitorFactory”类型中的方法“Create”没有实现。
Entity Framework Core .NET 命令行工具 5.0.0-rc.2.20475.6
完全错误 -
Build started...
Build succeeded.
System.TypeLoadException: Method 'Create' in type 'Pomelo.EntityFrameworkCore.MySql.Query.ExpressionVisitors.Internal.MySqlSqlTranslatingExpressionVisitorFactory' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=3.2.3.0, Culture=neutral, PublicKeyToken=2cc498582444921b' does not have an implementation.
at Microsoft.Extensions.DependencyInjection.MySqlServiceCollectionExtensions.AddEntityFrameworkMySql(IServiceCollection serviceCollection)
at Pomelo.EntityFrameworkCore.MySql.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 Commander.Data.CommanderContext..ctor(DbContextOptions`1 opt) in D:\.NET\project02\data\CommanderContext.cs:line 8
--- End of stack trace from previous location where …Run Code Online (Sandbox Code Playgroud) mysql entity-framework-core .net-core asp.net-core pomelo-entityframeworkcore-mysql