Fluent NHibernate + Lucene Search (NHibernate.Search)

前端 未结 2 1636
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 00:14

I\'m using Fluent NHibernate and I would like to implement NHibernate.Search with Lucene but I can\'t find any examples on how to do that with Fluent NHibernate. It appears ther

2条回答
  •  無奈伤痛
    2021-02-01 00:48

    If you're using the Fluent Configuration API, then you just need to use the ExposeConfiguration method to get at the NHibernate Configuration instance.

    Fluently.Configure()
      .Database(...)
      .Mappings(...)
      .ExposeConfiguration(cfg =>
      {
        cfg.SetListener(...);
        cfg.SetListener(...);
      })
      .BuildSessionFactory();
    

提交回复
热议问题