示例#1
0
        public IActionResult Delete(string id)
        {
            var person = _phoneBookService.Get(id);

            if (person == null)
            {
                return(NotFound());
            }

            _phoneBookService.Remove(person.Id);

            return(NoContent());
        }
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _service.Remove(id);

            return(Ok(result));
        }