// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, StockManagementContext context) { context.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); // global cors policy app.UseCors(x => x .AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials()); app.UseAuthentication(); app.UseMvc(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); }); }
public UsersController( IUserService userService, IMapper mapper, IOptions <AppSettings> appSettings, StockManagementContext context) : base(context) { _userService = userService; _mapper = mapper; _appSettings = appSettings.Value; }
public CompanyController(StockManagementContext context) : base(context) { _context = context; }
public StockRepository(StockManagementContext stockManagementContext) { _stockManagementContext = stockManagementContext; }
public BarcodeController(StockManagementContext context) { _context = context; }
public ProductController(StockManagementContext context) : base(context) { _context = context; }
public BalanceController(StockManagementContext context) : base(context) { _context = context; }
public TransactionController(StockManagementContext context) : base(context) { _context = context; }
public UserAccessController(StockManagementContext context) : base(context) { _context = context; }
public UserService(StockManagementContext context) { _context = context; }