public async Task <IActionResult> GetExercise([FromRoute] int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var exercise = await _exerciseService.FindBy(m => m.RecordId == id); if (exercise == null) { return(NotFound()); } return(Ok(exercise)); }