protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuidler.Entity<MyEntity>(entity =>
if (_settings.UseSql)
{
entity.Property(e => e.Id)
.HasColumnName("id")
.HasDefaultValueSql("(newid())");
}
else if (_settings.UseSqlite)
{
entity.Property(e => e.Id)
.HasColumnName("id")
.HasDefaultValue(Guid.NewGuid());
}
....
}
Import csv into sqlite
#cd to file.db
sqlite3
.open file.db
.mode csv
.import file.csv tablename