这是我获取某些数据的控制器方法
[HttpGet("{facilityId}/profile/{profileLanguageCode}")]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(WebApiResponseModel<FacilityDataModel>))]
public async Task<IActionResult> GetFacilitydata([FromRoute]FacilityDataSearchModel getFacilityDataRequest)
{
}
这是传入的模型
public class FacilityDataSearchModel
{
public string FacilityId { get; set; }
public string ProfileLanguageCode { get; set; }
[FromQuery(Name = "providerId")]
public List<string> ProviderIds { get; set; } = new List<string>();
}
我要在上面的url字符串中添加一个ProviderId数组,该如何指定呢?
喜欢
http://localhost:5000/api/FacilityProfile/000018211/profile/EN/ProviderIds=["000030778"]
它不起作用,是否需要将它用作
的查询字符串http://localhost:5000/api/FacilityProfile/000018211/profile/EN/?ProviderIds=["000030778"]