// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ConsignmentContext db)
        {
            Console.WriteLine("Create Database");
            db.Database.EnsureCreated();
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();
            app.UseMvc();
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
            });
        }
 public UserService(ConsignmentContext db)
 {
     this.db   = db;
     this.salt = System.Text.Encoding.UTF8.GetBytes("4DI0P3K6");
 }
 public MainController(ConsignmentContext db)
 {
     this.db = db;
 }
 public UserController(ConsignmentContext db, UserService userService)
 {
     this.db          = db;
     this.userService = userService;
 }
 public ProductController(ConsignmentContext db)
 {
     this.db = db;
 }