EntityFrameworkCore.ClickHouse
EntityFrameworkCore.ClickHouse copied to clipboard
AppendIdentityWhereCondition not inplemented
Im using library in project on net6. I want to create initial migration. After executing the command add-migration Init an exception occurs. Maybe i'm doing something wrong or migration dont work?
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeLoadException: Method 'AppendIdentityWhereCondition' in type 'ClickHouse.EntityFrameworkCore.Update.Internal.ClickHouseUpdateSqlGenerator' from assembly 'EntityFrameworkCore.ClickHouse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
at ClickHouse.EntityFrameworkCore.Extensions.ClickHouseServiceCollectionExtensions.AddEntityFrameworkClickHouse(IServiceCollection serviceCollection)
at ClickHouse.EntityFrameworkCore.Infrastructure.Internal.ClickHouseOptionsExtension.ApplyServices(IServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.ApplyServices(IDbContextOptions options, ServiceCollection services)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<GetOrAdd>g__BuildServiceProvider|4_0(IDbContextOptions _, ValueTuple2 arguments) at System.Collections.Concurrent.ConcurrentDictionary
2.GetOrAdd[TArg](TKey key, Func`3 valueFactory, TArg factoryArgument)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired)
at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options)
In source not imlementation 'AppendIdentityWhereCondition'
protected override void AppendIdentityWhereCondition(StringBuilder commandStringBuilder, ColumnModification columnModification) { }
Yeah, me too
Hey! Migrations currently are not supported. Please do not close this issue. I will take a look.
I also get the same error without migrations use like this
services..AddDbContext< MyDbContext >(options => options.UseClickHouse(connectionString));
using var context = scope.ServiceProvider.GetRequiredService< MyDbContext >(); context.Database.EnsureCreated(); // here error 'AppendIdentityWhereCondition' does not have an implementation.
@denis-ivanov do you have any ideas how to implement it in a proper way? I would like to help if it possible.
On net6 without migrations, if it defined in DI System.TypeLoadException: 'Method 'AppendIdentityWhereCondition' in type 'ClickHouse.EntityFrameworkCore.Update.Internal.ClickHouseUpdateSqlGenerator' from assembly 'EntityFrameworkCore.ClickHouse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'
On net6 without migrations, if it defined in DI System.TypeLoadException: 'Method 'AppendIdentityWhereCondition' in type 'ClickHouse.EntityFrameworkCore.Update.Internal.ClickHouseUpdateSqlGenerator' from assembly 'EntityFrameworkCore.ClickHouse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.'
Yep, it works only on EF5 and ClickHouse.Client 4.3.1
System.TypeLoadException:“Method 'AppendIdentityWhereCondition' in type 'ClickHouse.EntityFrameworkCore.Update.Internal.ClickHouseUpdateSqlGenerator' from assembly 'EntityFrameworkCore.ClickHouse, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.”
@denis-ivanov Can we support EF core 6? Considering that .net core 6 is a LTS version.
Please, try a new version EntityFrameworkCore.ClickHouse/0.0.12 and if it's still reproducible provide a minimum working example.