simpleidserver / EFCore.Cassandra

Entity Framework Core provider for Cassandra
Apache License 2.0
35 stars 16 forks source link

Method 'GenerateScript' does not have an implementation. (NET 5) #21

Closed turowicz closed 3 years ago

turowicz commented 3 years ago

Using latest release 2.0.4 in my code from https://github.com/simpleidserver/EFCore.Cassandra/issues/13:

await context.Database.EnsureCreatedAsync();

Started to throw this error on .NET 5.0:

Exception thrown: 'System.TypeLoadException' in EFCore.Cassandra.dll: 'Method 'GenerateScript' in type 'Microsoft.EntityFrameworkCore.Cassandra.Migrations.Internal.CassandraMigrator' from assembly 'EFCore.Cassandra, Version=2.0.4.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'
   at Microsoft.Extensions.DependencyInjection.CassandraServiceCollectionExtensions.AddEntityFrameworkCassandra(IServiceCollection serviceCollection)
   at Microsoft.EntityFrameworkCore.Cassandra.Infrastructure.Internal.CassandraOptionsExtension.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.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.get_Instance()
   at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.get_Dependencies()
   at Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreatedAsync(CancellationToken cancellationToken)
   at VU.Platform.Common.Persistance.CassandraRepository.<GetContext>d__42.MoveNext() in /workspaces/platform/src/VU.Platform.Common/Persistance/CassandraRepository.cs:line 460
turowicz commented 3 years ago

cc @simpleidserver

turowicz commented 3 years ago

That method clearly IS implemented in your repository.

turowicz commented 3 years ago

Looks like the EFCore in NET5 has changed so much, it renders this project obsolete.

I will give a go to https://github.com/MiracleDevs/Paradigm.ORM.

simpleidserver commented 3 years ago

For the next release (3.0.0), i'm going to migrate the project to DOTNET5.0 (please refer to the ticket https://github.com/simpleidserver/EFCore.Cassandra/issues/22)