I'm trying to map my database to NHibernate (coming from EF). All seems well until this code
private static ISessionFactory CreateSessionFactory()
{
return Fluently.Configure().Database(
MySqlConfiguration.Standard.ConnectionString(
c => c.FromConnectionStringWithKey("ConnectionString")
)
)
.Mappings(m => m.FluentMappings.AddFromAssemblyOf())
.BuildSessionFactory();
}
Please excuse the formatting, The purpose of this code is to demonstrate that The .Standard class is not there for some reason. I haven't found anyone else with this issue either. Any pointers or relevant information I could provide please let me know and I will gladly facilitate. Thank you for your time.
解决方案
Turns out, when using Fluent NHibernate there is a difference between
MySqlConfiguration
and
MySQLConfiguration
Easy to miss, so if you're having this same issue this is what you (and I!) did wrong.