public IActionResult Delete(long id)
        {
            _bookBusiness.Delete(id);


            return(NoContent());
        }
        public IActionResult Delete(int id)
        {
            if (id <= 0)
            {
                return(BadRequest());
            }
            _BookService.Delete(id);

            //NoContent qdo não retorna nada (204 na tela)
            return(NoContent());
        }
示例#3
0
        public IActionResult Delete(string id)
        {
            var person = _booksRepository.Delete(id);

            if (person != null)
            {
                return(NoContent());
            }
            else
            {
                return(BadRequest("Id not found"));
            }
        }