public IActionResult Edit(int id, [Bind("Id,ProductName,StartingPrice,IsSold")] Product product)
        {
            if (id != product.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(product);
                    _context.SaveChanges();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductExists(product.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(product));
        }
        public IActionResult Edit(int id, [Bind("Id,BuyerName,BuyerAccountNumber")] Buyer buyer)
        {
            if (id != buyer.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(buyer);
                    _context.SaveChanges();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BuyerExists(buyer.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(buyer));
        }
        public IActionResult Edit(int id, [Bind("Id,ProductId,BuyerId,SellerId,BidPrice")] Bid bid)
        {
            if (id != bid.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bid);
                    _context.SaveChanges();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BidExists(bid.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["BuyerId"]   = new SelectList(_context.Set <Buyer>(), "Id", "BuyerAccountNumber", bid.BuyerId);
            ViewData["ProductId"] = new SelectList(_context.Set <Product>(), "Id", "ProductName", bid.ProductId);
            ViewData["SellerId"]  = new SelectList(_context.Set <Seller>(), "Id", "SellerName", bid.SellerId);
            return(View(bid));
        }