Hello, i'm new to the forum
I started the NHibernate in Action tutorial. I use NHibernate-2.1.2.GA-bin and MS SQL Server 2008
I try to test the HelloNHibernate exemple. Running the application: generate an exception in this line of code (program.cs)
Code:
c.AddAssembly(Assembly.GetCallingAssembly());
and poste: Could not compile the mapping document: HelloNHibernate.Employee.hbm.xml
this is the code of Employee.hbm.xml
Code:
<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
auto-import="true">
<class name="HelloNHibernate.Employee, HelloNHibernate" lazy="false">
<id name="id" access="field">
<generator class="native" />
</id>
<property name="name" access="field" column="name"/>
<many-to-one access="field" name="manager" column="manager"
cascade="all"/>
</class>
</hibernate-mapping>
And this is the code of the Application Configuration File
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">
NHibernate.Connection.DriverConnectionProvider
</property>
<property name="connection.driver_class">
NHibernate.Driver.SqlClientDriver
</property>
<property name="connection.connection_string">
Server=(local);database=HelloNHibernate;Integrated Security=SSPI;
</property>
<property name="dialect">
NHibernate.Dialect.MsSql2008Dialect
</property>
<property name="show_sql">
false
</property>
</session-factory>
</hibernate-configuration>
</configuration>
I don't understand the problem, all the code is to copy paste from the tutorial :(
thank you for your help