I have this class in EF 6 and I am generating code from it using T4 templates.
public partial class LocationState
{
public LocationState()
{
}
public int LocationStateID { get; set; }
public Nullable<int> LocationCountryID { get; set; }
public string Name { get; set; }
public string Abbreviation { get; set; }
public virtual LocationCountry LocationCountry { get; set;}
}
From within a T4 template I can identify LocationCountry as a navigation property of the object. However, I'd like to pull out only the fields which are not keys, and LocationCountryID is considered a primitive type. How do I identify LocationCountryID as a key field? The Edm properties for LocationCountry do not seem to have the key field associated with them.
thanks,
john