Startup.cs 1.1 KB

1234567891011121314151617181920212223242526272829
  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(ISqeRepository<>), typeof(SqeRepository<>));
  19. services.AddScoped(typeof(ISystemJobAppService), typeof(SystemJobAppService));
  20. services.AddScoped<GZY.Quartz.MUI.Areas.MyFeature.Pages.MainModel>();
  21. }
  22. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
  23. {
  24. app.InitializeApplication();
  25. }
  26. }
  27. }