コード例 #1
0
 public Auction AddAuction(Auction newAuction)
 {
     _context.Auctions.Add(newAuction);
     _context.SaveChanges();
     return(newAuction);
 }
コード例 #2
0
        public Bid GetHighBid(Auction a2b)
        {
            Bid hiBid = _context.Bids.Where(x => x.Auctionid == a2b.Id).OrderByDescending(y => y.Amount).FirstOrDefault();

            return(hiBid);
        }