Ejemplo 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, RestoRentivaDbContext dbContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseSwagger();
                app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "restoRentiva v1"));
            }

            SeedDatabase.CreateAndSeed(dbContext);
            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
Ejemplo n.º 2
0
 public BaseController(RestoRentivaDbContext db)
 {
     this.db = db;
 }
Ejemplo n.º 3
0
 public BookingController(RestoRentivaDbContext db, IBookingRepository bookingRepository) : base(db)
 {
     this.bookingRepository = bookingRepository;
 }
Ejemplo n.º 4
0
 public TableRepository(RestoRentivaDbContext db)
 {
     this.db = db;
 }
Ejemplo n.º 5
0
 public TableController(RestoRentivaDbContext db, ITableRepository tableRepository) : base(db)
 {
     this.tableRepository = tableRepository;
 }
Ejemplo n.º 6
0
 public BookingRepository(RestoRentivaDbContext db)
 {
     this.db = db;
 }