Ich benutze fluentnhibernate mit PostgreSQL. Fluentnibernate ist die letzte Version. Die Version von PosrgreSQL ist 8.4. Mein Code für ISessionFactory erstellen:Fließend NHibernate und PostgreSQL, SchemaMetadataUpdater.QuoteTableAndColumns - System.NotSupportedException: Angegebene Methode wird nicht unterstützt
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)));
var nhibConfig = configuration.BuildConfiguration();
SchemaMetadataUpdater.QuoteTableAndColumns(nhibConfig);
return configuration.BuildSessionFactory();
}
Wenn ich ausführen bin Code in Zeile SchemaMetadataUpdater.QuoteTableAndColumns (nhibConfig); throw error: System.NotSupportedException: Angegebene Methode wird nicht unterstützt. Hilf mir bitte! Ich brauche dringend eine Lösung. Mit freundlichen Grüßen
Cool dies ('configuration.ExposeConfiguration ...') funktioniert auch für MS SQL (falls einige Wunder). – Nux
so alt Antwort, noch so frische Lösung;) Ich bewundere NHibernate Konsistenz ... –