title: Automapping and Fluent NHibernate
body: <p>I copied example from Fluent NHibernate GitHub documentation for automapping and it doesn't work in my ASP.NET MVC 4 app.</p>
  
  <pre><code>public class Product
  {
    public virtual int Id { get; set; }
    public virtual string Name { get; set; }
    public virtual decimal Price { get; set; }
  }
  
  public class Shelf
  {
    public virtual int Id { get;  set; }
    public virtual IList&lt;Product&gt; Products { get; set; }
  
    public Shelf()
    {
      Products = new List&lt;Product&gt;();
    }
  }
  </code></pre>
  
  <p>Are models. When I add </p>
  
  <pre><code>.Mappings(m =&gt; m.AutoMappings
       .Add(AutoMap.AssemblyOf&lt;Product&gt;()))
  </code></pre>
  
  <p>to my configuration I get error <code>No parameterless constructor defined for this object.</code>. Without that, my session works fine and also with mapping defined by me one by one, everything works. Just automapping doesn't work. What's the problem?</p>