No, not at all. That just covers one pattern for registering the ISession and ISessionFactory so they can be injected into DI-managed services (something I already have). What I need is for NH to use the DI container when creating the pieces it uses under the covers, such as IConnectionProvider.
Eric On Fri, Sep 18, 2020, 3:28 AM Paulo Quicoli <pauloquic...@gmail.com> wrote: > Hi > > Is this what you are looking for? > > https://gunnarpeipman.com/aspnet-core-nhibernate/ > > On Fri, Sep 18, 2020, 07:52 eric....@gmail.com <eric.ri...@gmail.com> > wrote: > >> Trying to use dependency injection with custom NHibernate implementation >> classes, specifically an IConnectionProvider. To be clear, I have NO >> interest in using DI with *entities*, just in a custom impl of a >> NHibernate interface. >> I've read the (old) articles (here >> <http://fabiomaulo.blogspot.com/2009/05/nhibernate-ioc-integration.html> >> and here >> <https://www.chadly.net/dependency-injection-with-nhibernate-and-autofac/>) >> and they sound promising, but the implementations are for Autofac, Spring, >> and Castle Windsor. Has nobody ever published an impl for .Net Core's >> "default" Microsoft.Extensions.DependencyInjection? I can't believe it >> hasn't been done before. >> >> Any pointers? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to nhusers+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/nhusers/e5065fc5-f8d7-4e9d-a9c4-5951404f59fcn%40googlegroups.com >> <https://groups.google.com/d/msgid/nhusers/e5065fc5-f8d7-4e9d-a9c4-5951404f59fcn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "nhusers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/nhusers/cdRA62nFo7I/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > nhusers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nhusers/CAF8vUGU56OEVaptvh6xm%3D%2BwDzTXRb4_q59XRCpN0K5Tt1U5Xkw%40mail.gmail.com > <https://groups.google.com/d/msgid/nhusers/CAF8vUGU56OEVaptvh6xm%3D%2BwDzTXRb4_q59XRCpN0K5Tt1U5Xkw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nhusers/CAFW84TLNAJp_cFTidKDdnZV-y4SS9-xryXJ7jH8wpwqCPuJcNg%40mail.gmail.com.