Exemplo n.º 1
0
        public async Task <ActionResult <TrainModel> > GetTrainAsync(int trainId)
        {
            var train = await _trainService.GetTrainAsync(trainId);

            if (train is null)
            {
                return(NotFound());
            }

            return(Ok(train));
        }