.net core3.1 use autofac

1. First mounting Autofac.Extensions.DependencyInjection
2. Add a line Program.cs, as shown below:
Here Insert Picture Description
3. In FIG Startup.cs increased as follows:
Here Insert Picture Description
4. Add the following items Library 2
Here Insert Picture Description
5. Add the following classes and interfaces
Here Insert Picture Description
Here Insert Picture Description
6 registered in the Startup inside
Here Insert Picture Description
7.Controller which calls
Here Insert Picture Description
8. Review the results
Here Insert Picture Description
9. Keep up the good oh!

Released nine original articles · won praise 1 · views 1478

Guess you like

Origin blog.csdn.net/FengxcLf/article/details/104991259