与FluentNHibernate连接

时间:2015-11-26 13:02:57

标签: mysql fluent-nhibernate

我在使用FluentNHibernate连接到MySQL数据库时遇到了一些问题。它不起作用。这是代码:

public static ISessionFactory Configure()
{
    return Fluently
        .Configure()
        .Database(
            MySQLConfiguration.Standard.ConnectionString(m =>
                m.Server("mn01.webd.pl")
                    .Database("database")
                    .Username("user")
                    .Password("pass")                   
                )
         )
         .Mappings(m => m.FluentMappings.AddFromAssemblyOf<Hala>())
         .BuildSessionFactory();
}

我正在使用远程主机来存储数据库系统。当我使用具有相同ConnectionString数据的ADO.NET时......它很有效。我不知道发生了什么事?

0 个答案:

没有答案
相关问题