📅  最后修改于: 2022-03-11 14:59:45.130000             🧑  作者: Mango
[RoutePrefix("api/EmployeeApi")]
public class EmployeeApiController : ApiController
{
//GET api/EmployeeApi
[HttpGet]
[Route("")]
public List GetAllStudents() { ... }
//GET api/EmployeeApi/EmailChange/foo/foo@email.com
[HttpGet]
[Route("EmailChange/{studentName}/{email}")]
public List EmailChange(string studentName, string email) { ... }
//GET api/EmployeeApi/AddressChange/foo/China
[HttpGet]
[Route("AddressChange/{studentName}/{address}")]
public List AddressChange(string studentName, string Address) { ... }
}