Mapping from X to Y is already registered
maelmahdy opened this issue · 7 comments
I'm facing this exception a lot of time recently when using dynamic mapping without registration.
here's the stack trace:
at ExpressMapper.MappingServiceProvider.RegisterInternal[T,TN](Boolean memberCaseInsensitive) in C:\SourceCode\ExpressMapper\ExpressMapper NET40\MappingServiceProvider.cs:line 96
at ExpressMapper.MappingServiceProvider.RegisterT,TN in C:\SourceCode\ExpressMapper\ExpressMapper NET40\MappingServiceProvider.cs:line 61
at ExpressMapper.MappingServiceProvider.MapInternal[T,TN](T src, TN dest, Boolean dynamicTrial) in C:\SourceCode\ExpressMapper\ExpressMapper NET40\MappingServiceProvider.cs:line 300
at ExpressMapper.MappingServiceProvider.Map[T,TN](T src) in C:\SourceCode\ExpressMapper\ExpressMapper NET40\MappingServiceProvider.cs:line 243
at ExpressMapper.Mapper.Map[T,TN](T src) in C:\SourceCode\ExpressMapper\ExpressMapper NET40\Mapper.cs:line 38
at Influence.Kernel.Application.Services.UserService.GetByName(String userName) in F:\Projects\Influence\Kernel\Influence.Kernel\Application\Services\UserService.cs:line 100
at Influence.Kernel.Application.Services.UserService._AuthenticateUser(String userName, String password) in F:\Projects\Influence\Kernel\Influence.Kernel\Application\Services\UserService.cs:line 70
at Influence.Kernel.Application.Services.UserService.AuthenticateUserByToken(String token) in F:\Projects\Influence\Kernel\Influence.Kernel\Application\Services\UserService.cs:line 55
at DynamicModule.ns.Wrapped_IUserService_9fe31f65bb7d4e27bd3a949206b7be11.<AuthenticateUserByToken_DelegateImplementation>__3(IMethodInvocation inputs, GetNextInterceptionBehaviorDelegate getNext)
Thanks for the input!
What version do you use @mr-unicoder ?
Thanks for your quick response @anisimovyuriy , i'm on v1.8.1.0
Can you tried to upgrade to 1.9.0 and issue still persist? if yes maybe you can give me some example that I can reproduce it.
Thanks!
This is solved after upgrading to 1.9.0 but now there's another problem, Mapper.Map<T, TN> fails if the object passed to it is NULL, this was not happening before.
Hi @mr-unicoder,
Thanks a lot for your input and contribution - let me do a hot-fix.
Thanks!
@anisimovyuriy ,
Any updates on this please ?
Fixed and will be included in 1.9.1 release!