Hi.
I have a problem with mapping a table in my database:
in my Web.Config i have:
Code:
<session-factory>
<property name="dialect">NHibernate.Dialect.MySQLDialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.MySqlDataDriver</property>
<property name="connection.connection_string">Server=myHost;Database=realty;User ID=myUser;Password=myPass</property>
<mapping assembly="Realty.DB" />
</session-factory>
and in my Contact.hbm.xml i have:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0"
namespace="Realty.DB" assembly="Realty.DB">
<class name="Contact" table="Contact">
<!-- A 32 hex character is our surrogate key. It's automatically
generated by NHibernate with the UUID pattern. -->
<id name="Id">
<column name="id" sql-type="int" not-null="true"/>
<generator class="uuid.hex" />
</id>
<!-- A Contact has to have a name, but it shouldn' be too long. -->
<property name="FirstName">
<column name="first_name" />
</property>
<property name="FirstName">
<column name="first_name" />
</property>
<property name="LastName">
<column name="last_name" />
</property>
<property name="PhoneHome">
<column name="phone_home" />
</property>
<property name="PhoneMobile">
<column name="phone_mobile" />
</property>
<property name="PhoneOther">
<column name="phone_other" />
</property>
<property name="Email">
<column name="enail" />
</property>
<property name="CreateTime">
<column name="create_time" />
</property>
</class>
</hibernate-mapping>
also i have a persistent class in Realty.DB with well formed structure(Properties and their getters/setters) located in App_Code/Realty/DB folder
All this stuff doesn't seems to work, can you explain what's the problem, and how to get rid of it.
Here's the Exception Message:
Could not load file or assembly 'Realty.DB' or one of its dependencies. The system cannot find the file specified.
I've Downloaded MySQL Connector/Net 5 and put adedd as a reference to my project.
I'm using .NET 2.0, MySQL 5.0
P.S. I think that the problem is in <mapping> tag in Web.Config what value should i give to assembly attribute?
Regards Harut, thanks in advance