Closed C-Wal closed 2 years ago
Hello!
ThrowIfAnyMappingPlanIsIncomplete
will throw an exception if the plan created for mapping two types:
A mapping plan is created either the first time any two types are mapped, or when you call one of the Mapper.GetPlansFor<TSource>().To<TTarget>()
methods.
Hope that makes sense?
Steve
Yes thanks for that explanation.
FYI I do have a situation where the mapping works but adding ThrowIfAnyMappingPlanIsIncomplete causes it to throws a 'Couldn't find a value for that key' exception but I don't have a repro yet.
If I use _mapper.WhenMapping.ThrowIfAnyMappingPlanIsIncomplete() then I get exceptions when my mapping runs but if I do not add _mapper.WhenMapping.ThrowIfAnyMappingPlanIsIncomplete() then the mapping works fine and returns my mapped object. Is this expected? I'm using 1.8.1.