-
Notifications
You must be signed in to change notification settings - Fork 17
ASP.NET Core
Kevin Bost edited this page Dec 21, 2018
·
2 revisions
AutoDI was designed to bring the same nice dependency injection framework that ASP.NET Core developers enjoy to other platforms. However, AutoDI can still offer compile time construction of the dependency injection registration calls to ASP.NET projects. You can enabled this with a couple NuGet packages and a single line of code.
- Install NuGet packages.
PM> Install-Package AutoDI.Build
andPM> Install-Package AutoDI.AspNetCore
- Invoke the
UseAutoDI
on your IWebHostBuilder (typically in your main method).
using AutoDI.AspNetCore
public static void Main(string[] args)
{
IWebHost host = new WebHostBuilder()
.UseAutoDI()
...
}