Beispiel #1
0
        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());
        }