Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
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.

  1. Install NuGet packages. PM> Install-Package AutoDI.Build and PM> Install-Package AutoDI.AspNetCore
  2. 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()
 ...
}

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /