A More Fluent API For AutoMapper

added by Matt_TCF
10/4/2010 8:26:21 PM

0 Kicks, 146 Views

I love AutoMapper. I’ve used it in virtually every ASP.NET MVC application I’ve ever worked on. It has saved me countless lines of tedious code, and it’s quite smart at inferring the correct mappings. However, my one complaint is that the API for specifying the more complicated mappings is, in a word, ugly. It’s flexible, sure, but ugly. In this post, I’ll show you how a few simple extension methods that can make things much prettier.