Startup.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. using Business.EntityFrameworkCore.SqlRepositories;
  2. using Business.SystemJob;
  3. using Business.SystemJobManagement;
  4. using Microsoft.AspNetCore.Builder;
  5. using Microsoft.AspNetCore.Hosting;
  6. using Microsoft.Extensions.DependencyInjection;
  7. using Microsoft.Extensions.Logging;
  8. namespace Business
  9. {
  10. public class Startup
  11. {
  12. public void ConfigureServices(IServiceCollection services)
  13. {
  14. services.AddApplication<BusinessHostModule>();
  15. services.AddScoped(typeof(ISqlRepository<>), typeof(SqlRepository<>));
  16. services.AddScoped(typeof(IExtSqlRepository<>), typeof(ExtSqlRepository<>));
  17. services.AddScoped(typeof(IExtRASqlRepository<>), typeof(ExtRASqlRepository<>));
  18. services.AddScoped(typeof(ISystemJobAppService), typeof(SystemJobAppService));
  19. services.AddScoped<GZY.Quartz.MUI.Areas.MyFeature.Pages.MainModel>();
  20. }
  21. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
  22. {
  23. app.InitializeApplication();
  24. }
  25. }
  26. }