/// <summary> /// This method gets called by the runtime. Use this method to add services to the container. /// </summary> public void ConfigureServices(IServiceCollection services) { ApiVersioningConfiguration.ConfigureService(services); services.AddMvc(); LoadAppSettings.IntoInjector(services, Configuration); DependencyInjectorHost.Configure(services); // Swagger SwaggerStartupConfiguration.ConfigureService(services, environment); }
/// <summary> /// This method gets called by the runtime. Use this method to add services to the container. /// </summary> public void ConfigureServices(IServiceCollection services) { //Ini Habilitar Cors services.AddCors(); services.AddControllers(); LoadAppSettings.IntoInjector(services, Configuration); DependencyInjectorHost.Configure(services); SwaggerStartupConfiguration.ConfigureService(services); AuthenticationConfiguration.AuthServices(services); CorsStartupConfiguration.ConfigureServices(services); //services.AddSingleton<ISingleton, Singleton>(); }
/// <summary> /// This method gets called by the runtime. Use this method to add services to the container. /// </summary> public void ConfigureServices(IServiceCollection services) { //services.AddHttpClient(); services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); ApiVersioningConfiguration.ConfigureService(services); services.AddMvc(); services.AddHttpClient(); LoadAppSettings.IntoInjector(services, Configuration); DependencyInjectorHost.Configure(services); // Swagger SwaggerStartupConfiguration.ConfigureService(services, environment); }