I Need To Add a new Item (eBay sandbox) Net SDK, itried from the ebay site and it didn't work (401 error: the URL is wrong). Now I'm trying to use the code from the SDK sample (consoleAddItem)

        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Create([Bind(Include = "Id,ProdName")] Product product)
        {
            AddItemCall addItemCall = new AddItemCall(apiContext);

            if (ModelState.IsValid)
            {
                product.Id = addItemCall.Item.ItemID;
                product.ProdName = addItemCall.Item.Title;
                db.Products.Add(product);
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(product);
        }
0

There are 0 best solutions below