// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, SenacDbContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); context.Database.EnsureCreated(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseCors(x => x .AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader() ); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public ColaboradorRepository(SenacDbContext context) : base(context) { }
public ProductsController(SenacDbContext context) { _context = context; }