public async Task <ActionResult <Trainer> > GetById(int id) { var trainer = await _trainerService.GetTrainerByIdAsync(id); if (trainer == null) { return(NotFound()); } return(Ok(trainer)); }