-
Åsidosätt DelimitIdentifier i NpgsqlSqlGenerationHelper så här:
public class SqlGenerationHelper : NpgsqlSqlGenerationHelper { public override string DelimitIdentifier(string identifier) => identifier.Contains(".") ? base.DelimitIdentifier(identifier) : identifier; }
-
Ersätt ISqlGenerationHelper med din klass med metoden ReplaceService:
public class MyContext : DbContext { public virtual DbSet<MyTable> MyTable { get; set; } public MyContext(DbConnection connection) : base(new DbContextOptionsBuilder().UseNpgsql(connection) .ReplaceService<ISqlGenerationHelper, SqlGenerationHelper>() .Options) { } }