// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddControllers(); DatabaseContext.Register(services, Configuration); DependencyInjection.Register(services, Configuration); Swagger.Register(services); }
/// <summary> /// This method gets called by the runtime. Use this method to add services to the container. /// </summary> /// <param name="services">Services Collection</param> public void ConfigureServices(IServiceCollection services) { services.AddMvc(options => { //options.Filters.Add<CustomExceptionsFilter>(); options.Filters.Add <ValidateModelStateAttribute>(); }).SetCompatibilityVersion(CompatibilityVersion.Version_2_1); //Cors.Register(Configuration, services); //Authorization.Register(services); //Authentication.Register(services, Configuration, Environment); Repositories.Register(services); Swagger.Register(services); }
/// <summary> /// This method gets called by the runtime. Use this method to add services to the container. /// </summary> /// <param name="services">Services Collection</param> public void ConfigureServices(IServiceCollection services) { services.AddMvc(options => { options.Filters.Add <CustomExceptionsFilter>(); options.Filters.Add <NotificationFilter>(); options.Filters.Add <ValidateModelStateAttribute>(); }).SetCompatibilityVersion(CompatibilityVersion.Version_2_2); //Cors.Register(Configuration, services); //Authorization.Register(services); //Authentication.Register(services, Configuration, Environment); DependencyInjection.Register(services); Swagger.Register(services); HealthCheck.Register(services, Configuration); Compression.Register(services); }