I implemented this pretty easily, and wrote about it at StackOverflow here 
<https://stackoverflow.com/a/64705016/639520>, if anyone wants to see the 
basic impl (without optimizations that I later added).

On Monday, September 21, 2020 at 1:11:48 PM UTC-4 Danny Van den Wouwer 
wrote:

> Hi,
>
> There isn't much documentation about this interface. And I believe they 
> are internally busy tot replace this interface in he next major version. 
> See issue 1793, 1781.
>
> You van Aldo read in this blog 
>
> https://kozmic.net/2011/03/20/working-with-nhibernate-without-default-constructors/
>
> Vriendelijke groeten,
> Van den Wouwer Danny
>
> Software Engineer
> Peopleware NV
> www.peopleware.be
>
> Op ma 21 sep. 2020 19:04 schreef [email protected] <[email protected]>:
>
>> I looked at the implementations in Fabio's uNhAddIns project 
>> <https://github.com/fabiomaulo/unhaddins/tree/master/uNhAddIns>, and 
>> implementing IObjectsFactory is simple. But even looking at the NHibernate 
>> source code it's not clear how and when IBytecodeProvider and 
>> IReflectionOptimizer are used. I want to fully understand these interfaces 
>> and how they are used in order to make sure I'm implementing the 
>> MS.Extensions.DI "adapter" correctly and completely.
>> Is there any documentation about those?
>>
>> On Saturday, September 19, 2020 at 7:32:42 AM UTC-4 [email protected] 
>> wrote:
>>
>>> Unfortunately no one has done this for 
>>> Micorosoft.Extensions.DependencyInjection. What you would need to do is to 
>>> implement IObjectsFactory (check examples from Fabio's blog). There are 
>>> only 3 or 4 methods. 
>>>
>>> Best Regards,
>>> Alexander
>>>
>>> On Fri, Sep 18, 2020 at 1:30 PM Eric Rizzo <[email protected]> wrote:
>>>
>>>> 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 <[email protected]> 
>>>> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> Is this what you are looking for?
>>>>>
>>>>> https://gunnarpeipman.com/aspnet-core-nhibernate/ 
>>>>>
>>>>> On Fri, Sep 18, 2020, 07:52 [email protected] <[email protected]> 
>>>>> 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 [email protected].
>>>>>> 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 
>>>>> [email protected].
>>>>> 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 [email protected].
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/nhusers/CAFW84TLNAJp_cFTidKDdnZV-y4SS9-xryXJ7jH8wpwqCPuJcNg%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/nhusers/CAFW84TLNAJp_cFTidKDdnZV-y4SS9-xryXJ7jH8wpwqCPuJcNg%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 [email protected].
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/nhusers/5cd07184-5464-4dde-8258-f2b0952ec00dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/nhusers/5cd07184-5464-4dde-8258-f2b0952ec00dn%40googlegroups.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nhusers/1fcfaf3f-c409-4c4e-acc8-918573b23698n%40googlegroups.com.

Reply via email to