Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Accessing DI from outside of mvc #5221


User avatar
0
greatsamps created

Hi,

Wondering if you can help here. Part of our project includes a library (written by us) that communicates with 3rd party systems via Akka.NET. What we are doing is starting the library and registering a static reference to a factory class during the startup routine in ASP.NET Boilerplate. Our ApplicationServices can talk to it, as its statically referenced, which is working fine.

The problem we are facing is that this library also needs to receive messages which need to be passed to an ApplicationService. Due to DI, this will not be as straightforward as sending the messages.

Does anyone have any pointers on how to go about doing this? My initial thoughts are to pass a reference to the DI framework when the library is initially started and using that, but as DI is pretty new to me, some pointers would be much appreciated1


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    You can register your instance <a class="postlink" href="https://stackoverflow.com/a/925274">https://stackoverflow.com/a/925274</a>.