public ProductTypesController(InventoryManagementDbContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime, InventoryManagementDbContext dbContext) { Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(_configuration) .Enrich.WithMachineName() .CreateLogger(); app.UseMvc(); app.UseDefaultFiles(); app.UseStaticFiles(); // Enable middleware to serve generated Swagger as a JSON endpoint. app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS etc.), specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "InventoryManagement API - v1"); }); // auto migrate db using (var scope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { var context = scope.ServiceProvider.GetService <InventoryManagementDbContext>(); context.MigrateDB(); } }
public PatientsController(InventoryManagementDbContext context) { _context = context; }
public EmployeesController(InventoryManagementDbContext context) { _context = context; }
public CSVLogic(InventoryManagementDbContext dbContext) { _context = dbContext; }
public DoctorsController(InventoryManagementDbContext context) { _context = context; }
public DesesasesController(InventoryManagementDbContext context) { _context = context; }
public InventoryController(InventoryManagementDbContext dbContext) { _context = dbContext; }
public HomeController(InventoryManagementDbContext context) { _context = context; }