NHibernate.MappingException: Pas de persister pour

Je suis début de mon aventure avec nHibernate et j'ai un problème.

Mon code:
Modèle/Projet.cs

namespace entity1.Model
{
    public class Project
    {
        public Guid Id { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }
    }
}

Model/Project.hbm.xml

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true" namespace="entity1.Model" assembly="entity1.Model">
  <class name="entity1.Model.Project, entity1.Model" lazy="false">
    <id name="id" column="prj_id"></id>
    <property name="Name" column="prj_name" />
    <property name="Description" column="prj_description" />
  </class>
</hibernate-mapping>

Web.config

<hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
    <session-factory>
      <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
      <property name="connection.connection_string">Server=(local);initial catalog=todo;Integrated Security=True</property>
      <property name="dialect">NHibernate.Dialect.MsSql2008Dialect</property>
      <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
      <mapping assembly="entity1.Model"/>
    </session-factory>
  </hibernate-configuration>

Test.aspx.cs

Project project = new Project();
//[...]
Configuration c = new Configuration();
c.AddAssembly(Assembly.GetCallingAssembly());

ISessionFactory factory = c.BuildSessionFactory();
using (ISession session = factory.OpenSession()) {
    using(ITransaction transaction = session.BeginTransaction()){
        session.Save(project);
        transaction.Commit();
}

Et d'exception:
Pas de persister pour: l'entité1.De modèle.Projet

Quel est le problème?

Je suis vraiment remercier pour tout le monde aide.
Désolé pour mon anglais. Il n'est pas trop bon.

InformationsquelleAutor kalinowski | 2014-01-05