I’d like to get all the Foreign Key columns in a Table in my entity.
For example:
class User
{
Id {get;set;}
Name {get;set;}
ColumnWithForeignKey1Id{get;set;}
ColumnWithForeignKey2Id{get;set;}
ColumnWithForeignKey3Id{get;set;}
}
result should be like:
- ColumnWithForeignKey1Id
- ColumnWithForeignKey2Id
- ColumnWithForeignKey3Id
Here is a example, to gather the ForeignKeys defined with a special attribute; for this question “AssociationAttribute” and inside a given class, for this example “ClassName”.
Thanks for
David Bfor the guidance.