BoardController.cs
842 Bytes
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
35
36
37
38
using Microsoft.AspNetCore.Mvc;
namespace HHECS.DAQServer.Controllers
{
/// <summary>
/// 看板接口
/// </summary>
[Route("api/[controller]")]
[ApiController]
public class BoardController : ControllerBase
{
// GET: api/<BoardController>
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/<BoardController>/5
[HttpGet("{id}")]
public string Get(int id)
{
return "value";
}
// POST api/<BoardController>
[HttpPost]
public void Post([FromBody] string value)
{
}
// PUT api/<BoardController>/5
[HttpPut("{id}")]
public void Put(int id, [FromBody] string value)
{
}
}
}