0

I'm trying to configure NHibernate to use a MySql database. I use the following code:

_sessionFactory = Fluently.Configure().Database(
                MySQLConfiguration.Standard.ConnectionString(
                cs => cs.Server("localhost").Database("Schedule").Username("root").Password("root"))
                ).Mappings(m => m.FluentMappings.AddFromAssemblyOf<NHibernateHelper>()).BuildSessionFactory();

and I have the following exception :

how to solve?

1
  • Does your database exist? FluentNHibernate does NOT create databases. Commented Oct 30, 2013 at 14:14

1 Answer 1

1

MySql ADO.NET driver dll is not in the directory of your program and also not installed. copy MySql.Data.dll into you program dir.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.