Exemplo n.º 1
0
        public async Task <Ticket> DeleteAsync(Ticket ticket)
        {
            _ticketRepository.Delete(ticket);
            await _ticketRepository.UnitOfWork.SaveChangesAsync();

            return(ticket);
        }
Exemplo n.º 2
0
        public StatusModel Delete(int id)
        {
            var response = new StatusModel();
            var ticket   = _ticketsRepository.GetById(id);

            if (ticket == null)
            {
                response.IsSuccessful = false;
                response.Message      = $"The Ticket with id {id} was not found";
            }
            else
            {
                _ticketsRepository.Delete(ticket);
            }

            return(response);
        }
 public void Delete(int id)
 {
     repository.Delete(id);
 }
Exemplo n.º 4
0
 public IActionResult Delete(int id)
 {
     _repo.Delete(id);
     return(Ok());
 }