sql >> Base de Datos >  >> RDS >> PostgreSQL

Fluent NHibernate y PostgreSQL, SchemaMetadataUpdater.QuoteTableAndColumns - System.NotSupportedException:el método especificado no es compatible

Prueba esto:

public static ISessionFactory CreateSessionFactory()
{
        string connectionString = ConfigurationManager.ConnectionStrings["PostgreConnectionString"].ConnectionString;
        IPersistenceConfigurer config = PostgreSQLConfiguration.PostgreSQL82.ConnectionString(connectionString);

        FluentConfiguration configuration = Fluently
            .Configure()
            .Database(config)
            .Mappings(m =>
                m.FluentMappings.Add(typeof(ResourceMap))                                    
                                .Add(typeof(TaskMap))
                                .Add(typeof(PluginMap)));
        configuration.ExposeConfiguration(x => x.SetProperty("hbm2ddl.keywords", "auto-quote"));
        return configuration.BuildSessionFactory();
}