public async Task <IActionResult> Delete([FromRoute] string id) { try { await _contactsService.DeleteAsync(new ObjectId(id)); } catch (NotFoundException) { return(NotFound()); } return(Ok()); }
public async Task <IActionResult> Delete(int id) { await _contactsService.DeleteAsync(id); return(Ok()); }