示例#1
0
        public async Task <ActionResult> DeleteTrainAsync(int trainId)
        {
            var train = await _trainService.GetTrainAsync(trainId);

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

            await _trainService.DeleteTrainAsync(trainId);

            return(NoContent());
        }