このメソッドを呼び出す:
public HttpResponseMessage PostProduct(Product item)
{
item = repository.Add(item);
var response = this.Request.CreateResponse<Product>CreateResponse(HttpStatusCode.Created, item);
string uri = Url.RouteUrl("DefaultApi", new { id = item.Id });
response.Headers.Location = new Uri(uri);
return response;
}
コンパイル時エラーが発生しています:
'System.Web.HttpRequestBase' does not contain a definition for 'CreateResponse' and the
best extension method overload 'System.Net.Http.HttpRequestMessageExtensions.CreateResponse<T>
(System.Net.Http.HttpRequestMessage, System.Net.HttpStatusCode, T)' has some invalid arguments.
ここで何が欠けていますか?