How can I find the primary key field of an entity type at runtime?
I'm presuming there is a method/property somewhere in the object matrix of the entity objects, but I haven't been able to find it.
I have no issue using reflection if that's the best/only way of doing this.
An example:
Given UserEntity with fields: id (PK), firstname, lastname.
I need to find that the 'id' property is the primary key field.