- Autofac IOC assembly is achieved inversion control, mainly with oriented programming interface, a large degree of complete decoupling work.
- Using the IOC, it must be oriented programming interface, a so-called oriented programming interface, i.e., the program is dependent on the abstract, without depending on the specific implementation.
- We need to try to write all the business logic in the service layer, control layer, which do not directly call a database context object, so, separate each operational level area to a certain extent, to better achieve the purpose of decoupling.
- Conventions: The controller is no longer calls the database context object, only to realize in the service layer specific calls.
- Autofac lifecycle Bowen may refer to: https: //blog.csdn.net/linshichen/article/details/82225274
Reference Hirofumi: Https://Www.Cnblogs.Com/fei686868/p/10979707.Html
The next chapter, officially entered the theme