public TicketDB Create(TicketDB ticket) { var db = new TicketDBContext(); db.Tickets.Add(ticket); db.SaveChanges(); return ticket; }
public ActionResult Edit(TicketDB ticketdb) { if (ModelState.IsValid) { db.Entry(ticketdb).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(ticketdb); }
public ActionResult Create(TicketDB ticketdb) { if (ModelState.IsValid) { db.Tickets.Add(ticketdb); db.SaveChanges(); return RedirectToAction("Index"); } return View(ticketdb); }
public TicketDB EditPost(TicketDB ticket) { var db = new TicketDBContext(); db.Entry(ticket).State = EntityState.Modified; db.SaveChanges(); return ticket; }
public ActionResult Edit(TicketDB ticketdb) { return View(_ticketRepository.EditPost(ticketdb)); }
public ActionResult Create(TicketDB ticketdb) { return View(_ticketRepository.Create(ticketdb)); }
public ActionResult Edit(TicketDB ticketdb) { _ticketRepository.EditPost(ticketdb); return RedirectToAction("Index"); }
public ActionResult Create(TicketDB ticketdb) { _ticketRepository.Create(ticketdb); return RedirectToAction("Index"); }