【发布时间】:2017-05-09 10:21:59
【问题描述】:
public IEnumerable<xxx.Models.Product> ReviewAll(string para1, string para2, string para3, int para4)
{
return //HTTPStatusCode
}
目前我正在使用这个
int HTTPResponse=400;
return Request.CreateResponse((HttpStatusCode)HTTPResponse, "InvalidID");
但这会返回一个错误提示
无法隐式转换类型“System.Net.Http.HttpResponseMessage” 到“System.Collections.Generic.IEnumerable”。一个 存在显式转换(您是否缺少演员表?)
如何解决这个问题??
【问题讨论】:
标签: c# asp.net asp.net-web-api http-status-code-404