TestService.cs 650 B

123456789101112131415161718192021222324252627
  1. using Admin.NET.Application.Const;
  2. namespace Admin.NET.Application.Serice;
  3. /// <summary>
  4. /// 自己业务服务
  5. /// </summary>
  6. [ApiDescriptionSettings(TestConst.GroupName, Name = "XXX模块", Order = 200)]
  7. public class TestService : IDynamicApiController, ITransient
  8. {
  9. private readonly SqlSugarRepository<Test> _testRep;
  10. public TestService(SqlSugarRepository<Test> testRep)
  11. {
  12. _testRep = testRep;
  13. }
  14. /// <summary>
  15. /// 获取列表
  16. /// </summary>
  17. /// <returns></returns>
  18. [HttpGet("/test/list")]
  19. public async Task<List<Test>> GetTestList()
  20. {
  21. return await _testRep.GetListAsync();
  22. }
  23. }