/// <summary> /// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. /// </summary> /// <param name="app"></param> /// <param name="env"></param> /// <param name="context"></param> public void Configure(IApplicationBuilder app, IHostingEnvironment env, DtDbContext context) { context.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // 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", "HsCode API V1"); }); app.UseMvc(); }
/// <summary> /// Constructor /// </summary> /// <param name="dbContext"></param> public CalculatorService(DtDbContext dbContext, IMapper mapper) { _dbContext = dbContext; _mapper = mapper; }
/// <summary> /// Constructor /// </summary> /// <param name="dbContext"></param> /// <param name="mapper"></param> public HsCodeService(DtDbContext dbContext, IMapper mapper) { _dbContext = dbContext; _mapper = mapper; }