Saturday, January 10, 2015

Dependency Injection in ASP.NET vNext



http://blogs.msdn.com/b/webdev/archive/2014/06/17/dependency-injection-in-asp-net-vnext.aspx

very interesting discussion here
http://forums.asp.net/t/1989008.aspx?Feedback+on+ASP+NET+vNext+Dependency+Injection

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: