title: ASP.Net MVC & NHibernate Burrow & Fluent NHibernate
body: <p>I am getting the following runtime error in my ASP.Net MVC application:</p>
  
  <pre><code>NHibernate.MappingException: No persister for: MyProject.Model.MyDomainObject
  </code></pre>
  
  <p>I am referencing the burrow and fluent binaries in my application and am reconfiguring burrow in Global.asax on Application_Start as follows:</p>
  
  <pre><code>var bf = new BurrowFramework();
  IFrameworkEnvironment fe = bf.BurrowEnvironment;
  Configuration cfg = fe.GetNHConfig("PersistenceUnit1");
  cfg.AddMappingsFromAssembly(Assembly.LoadFrom(Server.MapPath("~/bin/MyProject.Data.dll")));
  fe.RebuildSessionFactories();
  </code></pre>
  
  <p>I cannot for the life of me figure this out. If I setup a fluent NHibernate AutoPersistenceModel with my domain objects then everything works fine, it just doesn't work for manually configured fluent maps.</p>
  
  <p>The single map I have is as follows:</p>
  
  <pre><code>public class MyDomainObjectMap : ClassMap&lt;MyDomainObject&gt;
  {
      public MyDomainObjectMap()
      {
          WithTable("my_domain_object");
          Id(x =&gt; x.Id);
          Map(x =&gt; x.Name);
          Map(x =&gt; x.Description);
      }
  }
  </code></pre>
  
  <p>Any help would be much appreciated, please let me know if you need more detail.</p>
  
  <p>Thanks</p>