Merge WiseJ Dependency Injection in Asp.Net Depdenency Injection

0
1

Are there any plans to merge the WiseJ Dependency Injection with the Asp.Net Dependency Injection.

In Startup we like to register services that are used by WiseJ and a REST service ex. MailService.

Lifetime for Singleton and Transient would be the same. Only Scoped would be per Wisej application instead of request. Maybe we could also register additional services in the WiseJ specific main-method that are only WiseJ specific.

  • You must to post comments
0
0

The Application class is already implementing the IServiceProvider. Is there any option to redirect the GetService calls to our preferred DI container?

You don’t have to use Application.GetService(). You  an use any container. Usually a container instance is static. The container manages the lifetime of the services.

Is there any way to get session lifetime to the dotnet DI? What WiseJ callback would be suite best here to start and stop the scope lifetime?

Dotnet doesn’t have a default DI implementation. Aspnet core has it but I don’t think it supports the session scope.

It only supports static, request (scoped) and transient (a new instance on every request).

We don’t use the aspnet session and we don’t use the aspnet container. The app can use any container.

 

 

  • You must to post comments
0
0

The Application class is already implementing the IServiceProvider. Is there any option to redirect the GetService calls to our preferred DI container?

Is there any way to get session lifetime to the dotnet DI? What WiseJ callback would be suite best here to start and stop the scope lifetime?

  • You must to post comments
0
0

You can use aspnet core service container seamlessly in your code. The scope is whatever aspnet core supports. There is no concept of session though. Transient means that it’s recreated on every request.

Our service container supports sessions, singleton, and transient.

We are not merging our container with aspnet core’s container. Apps can use any service container they prefer, a popular is autofac, for example, but there are others as well.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.