public ActionResult EnterNew(AddTicketViewModel model) { Ticket ticket = new Ticket { Name = model.Name, Numbers = new int[6] { model.Numbers1, model.Numbers2, model.Numbers3, model.Numbers4, model.Numbers5, model.Numbers6 } }; TicketRepo.Add(ticket); return(View("DisplayTicket", TicketRepo.GetAll().LastOrDefault())); //if !IsValid: return View(model); }
public IEnumerable <Ticket> GetTickets() { return(TicketRepo.GetAll()); }
public IList<Ticket> GetAllTickets() { return _repo.GetAll(); }