This Nuget package Dependent on Microsoft.Extension.DependencyInjection ,That can be automatically discovered our have to registed Services in IOC .And auto invoke the IServiceCollection extend Function. We need to Create Class In our Project or Lib then add IServiceCollection Extend Function ,The Targo.Initialization.App need to Search that method by IServiceCollection Extend Function in Assemblys. We Must to Set the InitializationAssemblyHead in our appsetting.json ,The Targo need that to screening Assembly's Name,auto invoke the Type's IServiceCollection Extend Method in Assembly on next. In the Host project,we need to join Targo's invoke Action.In this End the Project can be automatically discovered to auto regist services. Now We Can Happy to Write or CRUD Code! ------------- 这个Nuget包依赖于Microsoft.Extension.DependencyInjection,可以自动发现我们必须在IOC中注册服务。并自动调用IServiceCollection扩展函数。 我们需要在我们的Project或Lib中创建类,然后添加IServiceCollection扩展函数,Targo.Initialization.App需要在Assemblys中通过IServiceCollection Extend函数搜索该方法。 我们必须在appsetting.json中设置InitializationAssemblyHead,Targo需要它来筛选Assembly的Name,然后在Assembly中自动调用Type的IServiceCollection Extend方法。 在Host项目中,我们需要加入Targo的invoke Action。为此,可以自动发现项目以自动注册服务。 现在我们可以很高兴地编写或CRUD代码了!
Install-Package Targo.Initialization.App -Version 1.0.1