public IHttpActionResult DeleteBeer(int id) { var result = _context.Delete(id); if (result == false) { return(NotFound()); } return(Ok()); }
public async Task <IActionResult> Delete(int id) { var entityFound = await _repository.ReadAsync(id); if (entityFound is null) { return(NotFound()); } _repository.Delete(entityFound); await _repository.SaveChangesAsync(); return(NoContent()); }
public string Delete(Beer beer) { return(_BeerRepository.Delete(beer)); }
public bool Delete(int id) { return(beerRepository.Delete(id)); }