You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We register custom mappings more then one time in GetCustomMappings.
When we use from i in t.GetTypeInfo().GetInterfaces() we get all interfaces IMapFrom, IMapTo and IHaveCustomMappings => we will register 3 times our mappings if they exist in our model.
var customMaps = from t in types
from i in t.GetTypeInfo().GetInterfaces()
where typeof(IHaveCustomMappings).GetTypeInfo().IsAssignableFrom(t) &&
!t.GetTypeInfo().IsAbstract &&
!t.GetTypeInfo().IsInterface
select (IHaveCustomMappings)Activator.CreateInstance(t);
Fix
var customMaps = from t in types
where typeof(IHaveCustomMappings).GetTypeInfo().IsAssignableFrom(t) &&
!t.GetTypeInfo().IsAbstract &&
!t.GetTypeInfo().IsInterface
select (IHaveCustomMappings)Activator.CreateInstance(t);
The text was updated successfully, but these errors were encountered:
We register custom mappings more then one time in GetCustomMappings.
When we use
from i in t.GetTypeInfo().GetInterfaces()
we get all interfaces IMapFrom, IMapTo and IHaveCustomMappings => we will register 3 times our mappings if they exist in our model.Fix
The text was updated successfully, but these errors were encountered: