예제 #1
0
        public ActionResult Create(Auction pvm)
        {
            Auction auction = new Auction
            {
                Description  = pvm.Description,
                Title        = pvm.Title,
                AuctionValue = pvm.AuctionValue,
                AuctionTimer = pvm.AuctionTimer,
                StartDate    = pvm.StartDate,
                EndtDate     = pvm.EndtDate,
                TimeLeft     = DateTime.Today - pvm.StartDate,
                IdProduct    = pvm.IdProduct
            };

            auctionservice.Add(auction);
            auctionservice.Commit();
            return(View(pvm));
        }