public async Task <IActionResult> Delete([FromRoute] int id) { var value = await _persons.GetByIdAsync(id); if (value == null) { return(NotFound($"{nameof(Person)} with id = {id} was not found")); } await _persons.DeleteAsync(value); return(Ok()); }