Saturday, January 10, 2015

Dependency Injection in ASP.NET vNext

very interesting discussion here

Step 1:

Start a new project

Step 2:

Step 3 :

Add  "Microsoft.Framework.DependencyInjection" entry to project.json

Step 4:

ADD  interface "IUser.CS" to your models

Step 5:
Add the implementation of "User.CS" to your models

Step 6:
Wire up the IUser Interface and User Class in the ConfigureServices method for startup.cs

Step 7

Add the constructor for controller and you are all set

No comments: