我正在尝试生成数据库的表,但未生成表。我正在做这样的映射:
using Domain.Entidades;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using NHibernate.Tool.hbm2ddl;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Domain.Infraestrutura
{
public class Conexao
{
public static void CriarTabelasBanco()
{
FluentConfiguration configuration = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(x => x.FromConnectionStringWithKey("psConnection")).ShowSql())
.ExposeConfiguration(cfg => new SchemaExport(cfg).Create(true, true))
.Mappings(x => x.FluentMappings.AddFromAssemblyOf<Pessoa>());
configuration.BuildSessionFactory();
}
}
}