New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapper.Map not working withing CreateMap #1587
Comments
Just remove Mapper.Map. |
For some reason the code has changed in the preview section it actually looks like this,
|
The remove mapper.map doesnt work as the src.Citation value is not the same type as the Parallel citations |
Make a gist that shows it doesn't work. |
Can you post your models? It looks like you're trying to map a single property in the source model into a list in the destination model, is that right? |
That is right yes, the models are basic and they were working in the 4.2 version but in this new update the error given complains about the ParralelCitations property. |
Ok, for using Mapper.Map, you need to use ResolveUsing and the overload that takes the resolution context. On that one is a mapper object that you'd use, not back to a static reference. |
@jbogard But why do that? Just MapFrom the source expression would work. |
This can be closed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The last .ForMember for ParallelCitations causes issues in the code when i call the Map within the API, the map Citation to CitationViewModel was created earlier in the config, Anybody know how to refactor this for V.5. thanks.
The text was updated successfully, but these errors were encountered: