Exemplo n.º 1
0
 public bool Create(Auctions bt)
 {
     if (bt != null)
     {
         bt.CreatedDate = System.DateTime.Now;
         _context.Auctions.Add(bt);
         _context.SaveChanges();
     }
     return(true);
 }
Exemplo n.º 2
0
        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);
        }