Autofac积累

Nop Commerce开源项目为了减少组件的耦合度,里使用了Autofac作为Ioc工具。http://code.google.com/p/autofac/ 官方网站的Wiki有很多文章来帮助程序猿学习并使用它,该随笔记录我在使用它过程中碰到的困惑以及自己的理解。

一. 实例范围(instance scope)

a>Instance Per Dependency: 

b>Single Instance:

c>Per Lifetime Scope:

d>Per Matching Lifetime Scope

e>Per Owned

原文地址:https://www.cnblogs.com/andrewcn/p/2936224.html