public async Task <ActionResult <TrainerDTO> > GetTrainer(int id, [FromQuery] bool isIncrementingViewCounter = false) { try { var trainer = await _trainerService.GetTrainer(id, isIncrementingViewCounter); return(Ok(trainer)); } catch (ArgumentNullException exception) { return(NotFound(exception.Message)); } catch (Exception exception) { return(BadRequest(exception.Message)); } }