public async Task <ActionResult> DeleteTicket(int id) { var ticketFromRepo = await _repo.GetById(id); if (ticketFromRepo == null) { return(NotFound()); } _repo.DeleteEntity(ticketFromRepo); await _repo.SaveChanges(); return(NoContent()); }
public async Task <ActionResult> DeleteTicket(int id) { var ticketFromRepo = await _repo.GetById(id); if (ticketFromRepo == null) { return(NotFound()); } _repo.DeleteEntity(ticketFromRepo); await _repo.SaveChanges(); return(NoContent()); }