这是我的行动
public AddressModel[] Get()
{
return addresses.ToArray();
}
public AddressModel Get([FromUri]GetAddressModelById model)
{
return Addresses.FirstOrDefault(x => x.Id == model.Id);
}
...
public class GetAddressModelById
{
public Guid Id { get; set; }
}
网址看起来像这样
domain:port/api/controller
domain:port/api/controller/[guid]
并且路由是默认路由。当我运行它时,我得到了异常Multiple actions were found that match the request
。我错过了什么?