what is dependency injection mvc 3

Posted by Jayakumars under ASP.NET AJAX on 4/18/2012 | Points: 10 | Views : 9767 | Status : [Member] [MVP] | Replies : 9
hi

what is Dependency Injection to mvc3 how to implemented this
for mvc3 project.

Mark as Answer if its helpful to you


Responses

Posted by: Sakthi.Singaravel on: 4/18/2012 [Member] Silver | Points: 25

Up
0
Down
Refer this link with simple example..

http://blogs.microsoft.co.il/blogs/gilf/archive/2010/10/17/dependency-injection-in-mvc-3-was-made-easier.aspx

Regards,
Singaravel M

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/18/2012 [Member] Starter | Points: 25

Up
0
Down
Dependency Injection is a form of Inversion of control where the dependent objects are injected into a class, instead of creating an instance.


------------------------------------------------
Learn throughout life

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajkatie on: 7/3/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
you can also refer following link
http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcdependencyinjection.aspx

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajkatie on: 7/22/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Kindly refer following link
http://www.codeproject.com/Articles/353183/Basics-of-ASP-NET-MVC-3-Part-III-Dependency-Inject

Rajesh Patel
.Net Trainer(MSCD | MCT | MS)
Brainbench (Asp.Net 4.5 and C# 5.0)

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/23/2012 [Member] Silver | Points: 25

Up
0
Down
Dependency injection (DI) design pattern is based on separating component behavior from dependency resolution without object intervention.
This pattern is a particular implementation of Inversion of Control, where the consumer object receives his dependencies inside constructor properties or arguments.
DI requires a framework component behind to deal with class constructor.

The advantages of using Dependency Injection pattern and Inversion of Control are the following:
Reduces class coupling
Increases code reusing
Improves code maintainability
Improves application testing

http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcdependencyinjection.aspx

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 7/23/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
Refer this url
http://msdn.microsoft.com/en-us/gg618491

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
Other reference http://stackoverflow.com/questions/4900398/learning-inversion-of-control-through-dependency-injection-in-mvc-3

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
Mark as answer if it helps...,That motivates...!!!

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: CGN007 on: 7/31/2012 [Member] Silver | Points: 25

Up
0
Down
Mark as answer if it helps...,That motivates...!!!

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response