📜  类型已经定义了一个名为“Get”的成员 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:19.289000             🧑  作者: Mango

代码示例1
you have to name your get functions:

public class UsersController : ApiController
{
    // GET api/companies/GetByUser/{company_id}/{user_id}
    public object GetByUser(int company_id, int user_id)
    {
       ...
    }

    // GET api/companies/GetByPlanet/{company_id}/{plant_id}
    public IEnumerable GetByPlanet(int company_id, int plant_id)
    {
       ...
    }
}