public async Task <IActionResult> DeleteCandidate([FromRoute] int id) { var candidate = await _candidateManager.GetAsync(id); if (candidate != null) { await _candidateManager.DeletCandidateAsync(id); return(new ContentActionResult <string>(HttpStatusCode.OK, "Successfully deleted", "OK", Request)); } return(new ContentActionResult <string>(HttpStatusCode.BadRequest, null, "Candidate Not Found", Request)); }