public async Task <Ticket> DeleteAsync(Ticket ticket) { _ticketRepository.Delete(ticket); await _ticketRepository.UnitOfWork.SaveChangesAsync(); return(ticket); }
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); }
public IActionResult Delete(int id) { _repo.Delete(id); return(Ok()); }