title: How do I turn off AutoMapper auto-list conversion between List<T> and EntitySet<T>?
body: <p>I'm mapping my Linq-To-SQL generated entities to DTOs using <a href="http://www.codeplex.com/AutoMapper" rel="nofollow noreferrer">AutoMapper</a>.</p>
  
  <p>When I initially created the unit tests, I had specific maps (through a static configuration class) set up to convert one type of EntitySet to a generic List  (and vice-versa)</p>
  
  <pre><code>Mapper.CreateMap&lt;EntitySet&lt;Member&gt;, List&lt;MemberDTO&gt;&gt;(); 
  Mapper.CreateMap&lt;List&lt;MemberDTO&gt;, EntitySet&lt;Member&gt;&gt;(); 
  </code></pre>
  
  <p>Upon removing the list conversions (upon figuring out that AutoMapper will convert these automatically), my unit tests still worked, but they slowed to a crawl.  It was so noticeably slow, it took literally a minute to perform each test.</p>
  
  <p>After re-adding the list mappings, the Unit Tests resumed their normal performance speeds.</p>
  
  <p>Is there a way to turn this auto conversion for lists off, so that I HAVE to map my list conversions?  I'd like it to throw an AutoMapperException if I fail to include a Map.  I'd like to avoid these performance issues.</p>
  
  <p>If worse comes to worse, I might just end up writing a quick code generation template to automagically create my mapping configuration class based off of the DTOs.  That way, I won't miss anything.</p>
  
  <p>Thanks.</p>