Tag Archives: automapper

AutoMapper upgrade to v12

We use AutoMapper in almost all of our solutions. The recent new version forced us to finally refactor the way we used to resolve external dependencies. As you can read here (https://docs.automapper.org/en/latest/12.0-Upgrade-Guide.html) the ServiceCtor was removed. Nugets First we upgraded … Continue reading

Posted in Development | Tagged , | Leave a comment

Logging from Automapper

We’ve been using automapper to convert objects for some time. Now I have the need for logging to help bugtracking. Below a short list of sources how we set this up. And now you’ll need a serviceprovider when unittesting. Thank … Continue reading

Posted in Development | Tagged , , , | Leave a comment

AutoMapper – converting objects

Image courtesy of Mike Enerio / unsplash.com https://www.nuget.org/packages/AutoMapper/ Mapping two objects using convention and coded/configurerdĀ mappings. This comes in handy when moving through the layers of a solutionĀ (data > business > viewmodel) Every property with the same name is automatically mapper … Continue reading

Posted in Development, Tooling | Tagged , , , | 1 Comment

AutoMapper pivot configuration

In our project we’re AutoMapper to transform a list of name – value pairs to objects with properties. It pivots by mapping the name of the pair to the property and assigning the value to it. We created an extension … Continue reading

Posted in Development | Tagged , | Leave a comment