常用方法
常用方法
常用方法
常用方法
public async Task <IActionResult> Get(string train_id) { var trainsDTO = await _trainService.GetByIdAsync(train_id); var trainsVM = Mapper.Map <TrainDTO, TrainVM>(trainsDTO); if (trainsVM == null) { return(NotFound()); } return(new ObjectResult(trainsVM)); }