public async Task <IHttpActionResult> AcceptJobApplicant(int applicantId, int jobId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var success = await _repo.AcceptApplicant(applicantId, jobId); if (success) { return(Ok("Applicant Accepted ")); } else { return(BadRequest("Failed to create a new job application")); } }