Hallo, danke für die Antwort 
In C# ist der Typ Guid Id (und es ist der PK) und das Entity Framework erstellte die Tabelle (ähnlich wie bei Spring Data JPA).
zu Punkt 2: Ja da hab ich versucht mit der GUI es zu erstellen, was auch nicht geklappt hat, und habe es mit dem Query Tool versucht:
CREATE OR REPLACE FUNCTION notify_id_trigger() RETURNS trigger AS $$
BEGIN
PERFORM pg_notify('new_id', NEW.ID);
RETURN new;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER data_modified AFTER insert or update on databaseName for each row execute procedure notify_id_trigger();
Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while updating the entries. See the inner exception for details.
---> Npgsql.PostgresException (0x80004005): 42703: Record »new« hat kein Feld »id«
at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)
Exception data:
Severity: FEHLER
SqlState: 42703
MessageText: Record »new« hat kein Feld »id«
Where: SQL-Anweisung »SELECT pg_notify('new_id', NEW.ID)«
PL/pgSQL-Funktion notify_id_trigger() Zeile 3 bei PERFORM
File: d:\pginstaller_12.auto\postgres.windows-x64\src\pl\plpgsql\src\pl_exec.c
Line: 5693
Routine: plpgsql_exec_get_datum_type_info
--- End of inner exception stack trace ---