In class NopObjectContext
System.Type configType = typeof(LanguageMap); //any of your configuration classes here
var typesToRegister = Assembly.GetAssembly(configType).GetTypes()
.Where(type => !String.IsNullOrEmpty(type.Namespace))
.Where(type => type.BaseType != null && type.BaseType.IsGenericType && type.BaseType.GetGenericTypeDefinition()
This makes NopObjectContext dependent on namespace Nop.Data.Mapping.Localization, which kind of break the design rules.
If we change it as
var typesToRegister = Assembly.GetExecutingAssembly ().GetTypes()
.Where(type => !String.IsNullOrEmpty(type.Namespace))
.Where(type => type.BaseType != null && type.BaseType.IsGenericType && type.BaseType.GetGenericTypeDefinition()
Which will take the dependency off.
Will that make the code look better?
Thanks