public bool DeleteAuctionBid(int id)
        {
            AuctionBid auctionbidToDelete =
                context.AuctionBids.FirstOrDefault(a => a.AuctionBidId == id);

            if (auctionbidToDelete == null)
            {
                return(false);
            }
            context.AuctionBids.Remove(auctionbidToDelete);
            context.SaveChanges();
            return(true);
        }
        public AuctionBid UpdateAuctionBid(AuctionBid auctionBid)
        {
            AuctionBid auctionbidToUpdate =
                context.AuctionBids
                .SingleOrDefault(a => a.AuctionBidId == auctionBid.AuctionBidId);

            if (auctionbidToUpdate != null)
            {
                auctionbidToUpdate.UserId    = auctionBid.UserId;
                auctionbidToUpdate.BidAmount = auctionBid.BidAmount;
                context.SaveChanges();
            }
            return(auctionbidToUpdate);
        }
 public AuctionBid CreateBid(AuctionBid auctionBid)
 {
     context.AuctionBids.Add(auctionBid);
     context.SaveChanges();
     return(auctionBid);
 }