接收未找到扩展方法
'NHibernate.Cfg.Configuration' does not contain a definition for 'IntegrateWithEnvers' and no extension method 'IntegrateWithEnvers' accepting a first argument of type 'NHibernate.Cfg.Configuration' could be found (are you missing a using directive or an assembly reference?)
我正在使用 NHibernate Envers 2、NHibernate 4 和 FluentNHibernate 1.4 和 asp.net 4.5。
我的配置是
using CancerConnect.Domain;
using CancerConnect.Infrastructure.Conventions;
using FluentNHibernate.Automapping;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using System;
var enversConf = new NHibernate.Envers.Configuration.Fluent.FluentConfiguration();
enversConf.Audit<Users>();
var cfg = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008.ConnectionString(p => p.FromConnectionStringWithKey("dbConnectionString")))
.Mappings(m => m.AutoMappings.Add(persistenceModel))
.ExposeConfiguration(conf =>
{
conf.IntegrateWithEnvers(enversConf);
})
.BuildConfiguration();
我错过了什么吗