Ici, j'utilise Asp.NetWebApi. J'ai écrit un code comme:WebApi MultipulUrl non pris en charge
public IEnumerable <Employee> GetEmployee()
{
var x = pro.GetEmployees();
return x;
}
public Employee GetEmployee(int id = 0) {
var x = pro.FindEmployee(id);
return x;
}
Il y a une erreur de lancer que je passe une URL comme http://localhost:57997/api/Friends
. Si je commente ce code Employee GetEmployee(int id = 0)
, cela fonctionne très bien.
Plusieurs actions ont été trouvées qui correspondent à la demande: GetEmployee le type Application.Api.Controllers.FriendsController GetEmployee sur le type Application.Api.Controllers.FriendsController