什么是.NET和ASP.NET MVC中的依赖注入? [英] What is Dependency Injection in .NET and ASP.NET MVC ?

查看:146
本文介绍了什么是.NET和ASP.NET MVC中的依赖注入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有谁可以解释一下.NET和ASP.NET MVC中的依赖注入?

我已经阅读了很多文章,但我什么都不懂。 />
所以请用例子清楚地解释它们。

Hi,
Can anyone explain me Dependency Injection in .NET and ASP.NET MVC ?
I had gone through many articles but i didnt understood anything.
So please explain them clearly with examples.

推荐答案

我记得作为初学者,我从PROFESSIONAL ASP.NET中理解了依赖注入的概念MVC 4书 - 依赖注入(第12章)。

我想,它会帮助你,因为你已经熟悉C#和MVC了。



学习后告诉我们您无法理解的地方。谢谢
I remember as a beginner, I understood the concept of Dependency Injection from "PROFESSIONAL ASP.NET MVC 4" book - Dependency Injection (Chapter 12).
I think, It will help you as you are familiar with C# and MVC already.

After studying let us know at which point you are not able to understand. Thanks


我对这个概念有同样的问题。

虽然有很多文章描述它,但它们并不容易理解。最后,我发现以下免费的书很容易理解



http://unity.codeplex.com/documentation [ ^ ]



也有一些样品,你可以理解它是如何工作的。

http://unity.codeplex.com/downloads/get/683531 [ ^ ]



我希望它能帮到你
I had the same problem with this concept.
Although there are many articles describing it, they aren't easy to understand it. At the end, I found the following book which is free very easy to understand

http://unity.codeplex.com/documentation[^]

there are some samples available as well and you can understand how actually it works.
http://unity.codeplex.com/downloads/get/683531[^]

I hope it will help you


这篇关于什么是.NET和ASP.NET MVC中的依赖注入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆