服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-24 090e455687745bc64c8e32baf480d9310f8e2a57
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.AspNetCore.Mvc;
using System.Runtime.InteropServices;
using Tiger.Api;
using Tiger.IBusiness;
 
namespace Tiger.Controllers.WMS
{
    /// <summary>
    /// MQTT测试控制器
    /// </summary>
    [ApiController]
    [Route("api/[controller]/[action]")]
    public partial class _WMSTestController : ControllerBase
    {
        [HttpGet]
        public async Task<IActionResult> DoSomething(int duration)
        {
            var begin = DateTime.Now;
 
            return Ok($"{begin:mmssfff} completed");
        }
 
        /// <summary>
        /// D1Async
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> D1Async(string param)
        {
            var data = DI.Resolve<ITest>().show();
            return Ok(data);
        }
    }
}