Хранимые функции и процедурыIQueryable
 
 static class PostgresCustomFunctions
{
   public static bool pg_try_advisory_xact_lock(long key)
    {
       throw new Exception("Postgres function");
    }
}


protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    modelBuilder
        .HasDbFunction(() => PostgresCustomFunctions.pg_try_advisory_xact_lock(default));
}
Теги: