TestService.cs 728 B

12345678910111213141516171819202122232425262728293031323334
  1. namespace Admin.NET.Application.Service;
  2. /// <summary>
  3. /// 测试服务
  4. /// </summary>
  5. [ApiDescriptionSettings(ApplicationConst.GroupName, Order = 200)]
  6. [AllowAnonymous]
  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. public string GetName()
  18. {
  19. return "Furion";
  20. }
  21. /// <summary>
  22. /// 获取列表
  23. /// </summary>
  24. /// <returns></returns>
  25. [HttpGet("/test/list")]
  26. public async Task<List<Test>> GetTestList()
  27. {
  28. return await _testRep.GetListAsync();
  29. }
  30. }