public void SaveAuction(Auction auction) { VendueContext context = new VendueContext(); context.Auctions.Add(auction); context.SaveChanges(); }
public List <Auction> GetAllOptions() { VendueContext context = new VendueContext(); return(context.Auctions.ToList()); }
public void UpdateAuction(Auction auction) { VendueContext context = new VendueContext(); context.Entry(auction).State = EntityState.Modified; }
public Auction GetAuctionByID(int ID) { VendueContext context = new VendueContext(); return(context.Auctions.Find(ID)); }