Exemplo n.º 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, GopatContext dataContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            Log.Information("Ensuring database exists...");
            dataContext.Database.EnsureCreated();

            app.UseSerilogRequestLogging(); // <-- Add this line

            app.UseOpenApi();
            app.UseSwaggerUi3();

            app.UseHttpsRedirection();

            app.UseRouting();


            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Exemplo n.º 2
0
 public SitesController(GopatContext context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public TestSlotsController(GopatContext context)
 {
     _context = context;
 }
Exemplo n.º 4
0
 public HomeController(ILogger <HomeController> logger, GopatContext context)
 {
     _logger  = logger;
     _context = context;
 }
Exemplo n.º 5
0
 public ContractsController(GopatContext context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public CompaniesController(GopatContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Exemplo n.º 7
0
 public CompaniesController(GopatContext context)
 {
     _context = context;
 }