依据您的偏好,可抉择选中 “Place solution and project in the same directory” 复选框。
7) 点击下一步。8) 在接下来显示的 “Additional Information” 窗口中,遴选公务员从顶部的下拉列表中抉择 .NET 6.0 作为指标框架。将 “Authentication Type” 保留为 “None”(默认)。
9) 确保未选中 “Enable Docker,”、“Configure for HTTPS” 和 “Enable Open API Support” 复选框,因为咱们不会在此处应用任何这些性能。您也能够抉择勾销选中 “Use controllers(勾销选中以应用起码的 API)” 复选框,遴选公务员因为咱们将创立本人的控制器。
接口来创立依赖项注入容器。一旦创立了容器,IServiceCollection 实例就会组合成一个 IServiceProvider 实例。咱们能够应用此实例来解析服务。咱们能够将 IServiceProvider 类型的实例注入到类的任何办法中。http://lx.gongxuanwang.com/ss...