public async Task <IActionResult> Save(Applicant applicant) { int id = 0; if (ModelState.IsValid) { id = await _repository.CreateNew(applicant); if (id > 0) { return(CreatedAtAction(nameof(GetOne), new { id = applicant.Id }, applicant)); } else { return(BadRequest("Something Went Wrong")); } } else { var a = ModelState; return(BadRequest(ModelState)); } }