My request. Given the following code:
Code: Select all
var navProperties = cls.RelationProperties
.Where(rp => rp.Generate)
.OfType<EntityRelationProperty>().ToList();
bool isCollection = navProperty.Multiplicity == Multiplicity.Many;
if (isCollection) {
string typeName = navProperty.RelationClass.Name;
string propertyName = navProperty.Name;
string keyPropertyInCollectionItemBackToParent = navProperty.???
}
For example, if I have an entity A with a collection named B of type C, and I have the model set to add the foreign key properties to C, what property or function do I use in the NavProperty to get the name of that foreign key property, which will be something like AId?
This is a C# Entity Framework 6 POCO model, using dotConnect SQLite