All my relations have ON DELETE set to RESTRICT.
When generating code with a DB-first approach using:
dotnet ef dbcontext scaffold "<connstring>" Npgsql.EntityFrameworkCore.PostgreSQL
in Context.cs I get:
entity.HasOne(d => d.ContactPerson) .WithMany(p => p.Registrations) .HasForeignKey(d => d.ContactPersonId) .OnDelete(DeleteBehavior.ClientSetNull) .HasConstraintName("contact_persons_fkey");