Chapter 3, Implementing Design Patterns – Basics Part 1, and the first part of this chapter have illustrated the GoF patterns without using any frameworks. It is worth covering this as, sometimes, a framework is not available for a specific pattern or applicable in a particular scenario. Additionally, it is important to understand what functionality the framework is providing in order to know when a pattern should be used. The rest of this chapter will look at a couple of features that .NET Core provides that support some of the patterns we have covered so far.
Features in .NET Core
IServiceCollection
.NET Core was designed with Dependency Injection (DI) built-in to the framework. Typically, the start of a .NET Core...