using Microsoft.AspNetCore.Mvc;
using TodoApi.Model;
using TodoApi.Server;
namespace TodoApi.Controllers
{
[ApiController]
[Route("[controller]")]
public class TestController :ControllerBase
{
[HttpGet("one")]//(“xxx”)与HttpGet做区分
public int get()
{
var server = new TestServer();
server.table();
return 1;
}
[HttpGet]
public List<Table_1> Table()
{
var server = new TestServer();
var r=server.table();
return r;
}
[HttpPost(Name = "post")]
public int Get1()
{
var server = new TestServer();
var conut = server.Conut();
return conut;
}
}
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章