Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
dotnet核心c#依赖注入中的HostBuilder vs ServiceProvider?_C#_.net Core_Dependency Injection - Fatal编程技术网

dotnet核心c#依赖注入中的HostBuilder vs ServiceProvider?

dotnet核心c#依赖注入中的HostBuilder vs ServiceProvider?,c#,.net-core,dependency-injection,C#,.net Core,Dependency Injection,dotnetcore依赖注入系统看起来一团糟。有这么多的选择和方法做事情 我在阅读有关服务提供商的文章时遇到了通用hostbuilder 有什么区别?什么时候使用hostbuilder而不是简单的服务提供商

dotnetcore依赖注入系统看起来一团糟。有这么多的选择和方法做事情

我在阅读有关服务提供商的文章时遇到了通用hostbuilder

有什么区别?什么时候使用hostbuilder而不是简单的服务提供商