public IActionResult AddProduct(AddProductViewModel db) { ProductRepository repo = new ProductRepository(); IProductsRepository target = new ProductAdapter(repo); string stringFileName = UploadFile(db); var product = new Products() { Name = db.Name, Price = db.Price, ItemsLeft = db.ItemsLeft, ItemsSold = db.ItemsSold, Image = stringFileName }; target.AddProduct(product); return(View()); }