• 2024-08-22Asp .Net Core 学习笔记
    Startup类ConfigureServices方法注册服务,并通过依赖注入(DI)或者ApplicationServices在整个应用中使用服务使用IServiceCollection的各种Add{Service}进行注册,例如,AddDbContext、AddDefault、AddEntityFrameworkStores和AddPages在Configure方法配置应用服务之前,由主机