Ejemplo n.º 1
0
        public IHttpActionResult DeleteBeer(int id)
        {
            var result = _context.Delete(id);

            if (result == false)
            {
                return(NotFound());
            }
            return(Ok());
        }
Ejemplo n.º 2
0
        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));
 }
Ejemplo n.º 4
0
 public bool Delete(int id)
 {
     return(beerRepository.Delete(id));
 }