-
Tilsidesæt DelimitIdentifier i NpgsqlSqlGenerationHelper sådan her:
public class SqlGenerationHelper : NpgsqlSqlGenerationHelper { public override string DelimitIdentifier(string identifier) => identifier.Contains(".") ? base.DelimitIdentifier(identifier) : identifier; }
-
Erstat ISqlGenerationHelper med din klasse ved hjælp af ReplaceService-metoden:
public class MyContext : DbContext { public virtual DbSet<MyTable> MyTable { get; set; } public MyContext(DbConnection connection) : base(new DbContextOptionsBuilder().UseNpgsql(connection) .ReplaceService<ISqlGenerationHelper, SqlGenerationHelper>() .Options) { } }