Commit 291db513 by 赵剑炜

修改无法生成Swagger的错误

parent 5a027edb
...@@ -12,12 +12,12 @@ namespace APIs.Controllers ...@@ -12,12 +12,12 @@ namespace APIs.Controllers
public class MapperController : ControllerBase public class MapperController : ControllerBase
{ {
public IMapper Mapper { get; } public IMapper Mapper { get; }
private readonly IUserService _tService;
public MapperController(IMapper mapper, IUserService userService) public MapperController(IMapper mapper )
{ {
_tService=userService;
Mapper = mapper; Mapper = mapper;
} }
...@@ -29,14 +29,14 @@ namespace APIs.Controllers ...@@ -29,14 +29,14 @@ namespace APIs.Controllers
return userDto; return userDto;
} }
[HttpGet] //[HttpGet]
public EquipmentTypeDto GetTest() //public EquipmentTypeDto GetTest()
{ //{
var userDto = new EquipmentTypeDto(); // var userDto = new EquipmentTypeDto();
List<Users> aa= _tService.GetData();
Mapper.Map(aa, userDto); // Mapper.Map(aa, userDto);
return userDto; // return userDto;
} //}
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论