Dependency Injection in .NET Core Using Autofac
Official Documentation
https://autofaccn.readthedocs.io/zh/latest/index.html
Creating a .NET Core Console Application
Registering Types – Example One
Define an interface IPerson
public interface IPerson
{
void Introduce();
}
Implemant the interface with a Worker class
public class Worker : IPerson
{
public void Introduce()
{
...
Posted on Fri, 11 Sep 2026 16:39:24 +0000 by Brad420