Example #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, CarTechContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                context.Database.EnsureCreated();
            }

            // app.UseHttpsRedirection();

            app.UseSwagger();
            app.UseSwaggerUI(o => {
                o.SwaggerEndpoint("/swagger/v1/swagger.json", "CarTech Registration V1");
            });

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            app.UseCors(options => options.AllowAnyOrigin());
        }
Example #2
0
 public UserRepository(CarTechContext context)
     : base(context)
 {
     _context = context;
 }
Example #3
0
 public ClienteRepository(CarTechContext context)
     : base(context)
 {
     _context = context;
 }
Example #4
0
 public CategoriaRepository(CarTechContext context)
     : base(context)
 {
     _context = context;
 }
Example #5
0
 public RepositoryBase(CarTechContext context)
 {
     _context = context;
 }
Example #6
0
 public RepositoryWrapper(CarTechContext context)
 {
     _context = context;
 }