Hey Everyone!
So I have been battling with this exception for some time. I am developing a web project. When I attempt to build that applicaiton I get the following exception:
Could not compile the mapping document: MySql.Domain.Users.hbm.xml
The innerexception:
{"Could not find the dialect in the configuration"}
Everything I have read leads me back to a change in NHibernate related to the configuration. I have tried several changes. Most of the examples I have seen appear to be forms apps so they are in the app.config context rather than the web.config like my project. Here is the config section of my web.config:
Code:
<configSections>
<section
name="nhibernate"
type="System.Configuration.NameValueSectionHandler, System,
Version=1.0.5000.0,Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
</configSections>
<nhibernate>
<add key="hibernate.connection.provider"
value="Hibernate.Connection.DriverConnectionProvider"
/>
<add key="dialect"
value="NHibernate.Dialect.MySQLDialect"
/>
<add key="hibernate.connection.driver_class"
value="NHibernate.Driver.MySqlDataDriver"
/>
<add key="hibernate.connection.connection_string"
value="User ID=sa;Password=bingogo867;Data Source=test;Initial Catalog=MyDB"/>
</nhibernate>
Can someone give me some help on this? The Exception occurs when executing the configuration method. THANKS!
Code:
Configuration cfg = new Configuration();
cfg.AddAssembly("MySql.Domain");
cfg.Configure();