public bool Create(Auctions bt) { if (bt != null) { bt.CreatedDate = System.DateTime.Now; _context.Auctions.Add(bt); _context.SaveChanges(); } return(true); }
public bool Update(int id, Auctions ac) //made by me { var cc = _context.Auctions.Find(id); if (cc != null) { cc.ModifiedDate = System.DateTime.Now; cc.AuctionName = ac.AuctionName; _context.SaveChanges(); } return(true); }