예제 #1
0
        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);
        }
예제 #2
0
 public IEnumerable <Ticket> GetTickets()
 {
     return(TicketRepo.GetAll());
 }
예제 #3
0
 public IList<Ticket> GetAllTickets()
 {
     return _repo.GetAll();
 }