-
Заменете DelimitIdentifier в NpgsqlSqlGenerationHelper по този начин:
public class SqlGenerationHelper : NpgsqlSqlGenerationHelper { public override string DelimitIdentifier(string identifier) => identifier.Contains(".") ? base.DelimitIdentifier(identifier) : identifier; }
-
Заменете ISqlGenerationHelper с вашия клас, като използвате метода 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) { } }