title: Could not compile the mapping document in NHibernate
body: <p>The exception is:</p>
  
  <blockquote>
    <p>Could not compile the mapping document: WindowsFormsApplication2.Products.hbm.xml</p>
  </blockquote>
  
  <p>and the inner exception is:</p>
  
  <blockquote>
    <p>Persistent class Sample.CustomerService.Domain.Products, Sample.CustomerService. Domain not found</p>
  </blockquote>
  
  <p>my configuration is:</p>
  
  <p><a href="http://www.use.com/CJ9C9" rel="nofollow">config file ,i could not paste here because of error ,i did not accept all code hare so i put a link here</a></p>
  
  <p><a href="http://www.use.com/CJ9E5" rel="nofollow">and this is mapping file.</a></p>
  
  <p>And class for mapping is</p>
  
  <pre><code>namespace Sample.CustomerService.Domain
  {
      public class Product
      {
          public virtual int Productid { get; set; }
          public virtual string Name { get; set; }
      }
  }
  </code></pre>
  
  <p>and session factory is</p>
  
  <pre><code>public sealed class SessionFactory
  {       
      private static volatile ISessionFactory iSessionFactory;
      private static object syncRoot = new object();
  
      public static ISession OpenSession
      {
          get
          {
              if (iSessionFactory == null)
              {
                  lock (syncRoot)
                  {
                      if (iSessionFactory == null)
                      {
                          Configuration configuration = new Configuration();
                          configuration.AddAssembly(Assembly.GetCallingAssembly());
                          iSessionFactory = configuration.BuildSessionFactory();
                      }
                  }
              }
              return iSessionFactory.OpenSession();
          }
      }
  } 
  </code></pre>
  
  <p>when i try to get record by this code</p>
  
  <pre><code>using (ISession session = SessionFactory.OpenSession)
  {
      IQuery query = session.CreateQuery("FROM Products");
      IList&lt;Products&gt; pInfos = query.List&lt;Products&gt;();
      dgView.DataSource = pInfos;
  }
  </code></pre>
  
  <p>it gives me error could not compile mapping document as explained above.
  i am new to hibernate, i added hibernte from nugget.org by manage nugget pcakage option in visual studio 2012, it added two dlls nhhibernate and Iesi.collections. please help me fix this error, i gave all info in my knowledge.</p>