Npgsql Api Docs

NpgsqlCommand.LastInsertedOID Property

Returns oid of inserted row. This is only updated when using executenonQuery and when command inserts just a single row. If table is created without oids, this will always be 0.

[Visual Basic]
Public ReadOnly Property LastInsertedOID As Long
[C#]
public long LastInsertedOID {get;}

See Also

NpgsqlCommand Class | Npgsql Namespace