Entity Framework 6 RTM - Custom Relationship Convention -
i using convention this in beta version of ef6:
public class navigationpropertyconfigurationconvention : iconfigurationconvention<propertyinfo, navigationpropertyconfiguration> { public void apply(propertyinfo propertyinfo, func<navigationpropertyconfiguration> configuration) { var foreignkeyproperty = propertyinfo.declaringtype.getproperty("id" + propertyinfo.name); if (foreignkeyproperty != null && configuration().constraint == null) { var fkconstraint = new foreignkeyconstraintconfiguration(); fkconstraint.addcolumn(foreignkeyproperty); configuration().constraint = fkconstraint; } } }
but iconfigurationconvention interface has been marked internal, can't upgrade ef's references. have searched many places, not found how reproduce functionality in rtm version.
i have tried this, seems works independent associations (ias), not case cause have fks in clr objects.
has done works again?
thanks!
Comments
Post a Comment