public async Task <IActionResult> DeleteTerm([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var term = await _termService.GetTermAsync(id); if (term == null) { return(NotFound()); } await _termService.DeleteTermAsync(term); return(Ok(term)); }