public async Task <ActionResult> GetResult([FromRoute] int examId, [FromRoute] int candidateId) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var results = await _candidateRepo.SubjectWiseResults(examId, candidateId); if (results == null) { return(NotFound()); } return(Ok(results)); }