AutoMapper – converting objects

Image courtesy of Mike Enerio /
Image courtesy of Mike Enerio /

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 – hence the name.

The newest version of AutoMapper offers an Interface for use with IoC. Save the MapperConfiguration and use it every time to construct the IMapper impementation (config.CreateMapper())

About erictummers

Working in a DevOps team is the best thing that happened to me. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Development, Tooling and tagged , , , . Bookmark the permalink.

1 Response to AutoMapper – converting objects

  1. Pingback: Bogus – testdata generator | .NET Development by Eric

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.