You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I'm testing the migration with EF Core with MSSQL-Server and Firebird 3.0.
I create a new table with a few fields. The key-field has the property .ValueGeneratedOnAdd(), but the key-field in the Firebird database doesn't get an auto-increment during the migration. It works with the MS-SQL-Server correctly.
I use the framework FirebirdSql.EntityFrameworkCore.Firebird version 6.6.0.
modelBuilder.Entity("GenerateCodeFromDB.DB_Modell.TblTest", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnName("ID")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
ValueGeneratedOnAdd is not enough. You should also use UseFirebirdIdentityColumn or UseFirebirdSequenceTrigger which sets the correct ValueGenerationStrategy.
Is there any example or documentation how to do this and the code should look like?
I tried something like this:
.HasAnnotation("Firebird:UseFirebirdIdentityColumn", FbValueGenerationStrategy.IdentityColumn)
Submitted by: Henning Hassmann (henning)
Hi. I'm testing the migration with EF Core with MSSQL-Server and Firebird 3.0.
I create a new table with a few fields. The key-field has the property .ValueGeneratedOnAdd(), but the key-field in the Firebird database doesn't get an auto-increment during the migration. It works with the MS-SQL-Server correctly.
I use the framework FirebirdSql.EntityFrameworkCore.Firebird version 6.6.0.
modelBuilder.Entity("GenerateCodeFromDB.DB_Modell.TblTest", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnName("ID")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
});
The text was updated successfully, but these errors were encountered: