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
When using Code-First, it's easy to change database file: for example
options.UseSqlite(connectionString)
options.UseSqlserver(connectionString)
2, The code generate by efg is not that flexible since:
efg create mapping file with db specific type such as:
builder.Property(t => t.Id)
.IsRequired()
.HasColumnName("Id")
.HasColumnType("int")
.ValueGeneratedOnAdd();
The specific ColumnType is not required with entity framework, it can generate automatically based on the model fields => the needed code is only:
builder.Property(t => t.Id)
.IsRequired()
.HasColumnName("Id")
.ValueGeneratedOnAdd();
By remove // .HasColumnType("int") our code can support to change db type again.
So, Loresoft, can we have option not to generate ColumnType in our yml configuration file?
Thank you.
Sincerely
The text was updated successfully, but these errors were encountered:
Hello Loresoft,
2, The code generate by efg is not that flexible since:
builder.Property(t => t.Id)
.IsRequired()
.HasColumnName("Id")
.HasColumnType("int")
.ValueGeneratedOnAdd();
builder.Property(t => t.Id)
.IsRequired()
.HasColumnName("Id")
.ValueGeneratedOnAdd();
By remove // .HasColumnType("int") our code can support to change db type again.
Thank you.
Sincerely
The text was updated successfully, but these errors were encountered: