AddTransient, AddScoped and AddSingleton Services Differences

后端 未结 8 1626
时光取名叫无心
时光取名叫无心 2020-11-22 13:36

I want to implement dependency injection (DI) in ASP.NET Core. So after adding this code to ConfigureServices method, both ways work.<

8条回答
  •  无人及你
    2020-11-22 14:02

    This image illustrates this concept well. Unfortunately, I could not find the original source of this image, but someone made it, he has shown this concept very well in the form of an image.

提交回复
热议问题