Ticket T486605
Visible to All Users

MVC Wrappers HttpRequest does not contain a definition of CreateResponse

created 8 years ago

Hi

I'm using ASP.NET Core.
I'm trying to follow the instruction for ASP.NET MVC Wrappers Data Binding (https://js.devexpress.com/Documentation/16_2/Guide/ASP.NET_MVC_Wrappers/Data_Binding/) and in ASP.NET Web API
the first method is failing because of the error
"HttpRequest does not contain a definition of CreateResponse"
so the Request.CreateResponse doesn;t exists

[HttpGet]
public HttpResponseMessage Get(DataSourceLoadOptions loadOptions) {
return Request.CreateResponse(DataSourceLoader.Load(_nwind.Orders, loadOptions));
}
How can I correct this problem?

Regards
Dimitris

Comments (2)
DevExpress Support Team 8 years ago

    It's difficult to say for sure without reviewing your project. For now, I can only suggest you ensure that the base class for your controller is ApiController. If the base class is correct, please send us a sample project that reproduces the issue so that we can research it on our side. I am looking forward to your response.

    DM DM
    Dimitris Milonas 1 8 years ago

      Hi
      There is no ApiController in ASP.NET Core. It's been replaced with the Controller class.
      Regards
      Dimtiris

      Answers approved by DevExpress Support

      created 8 years ago

      Hello Dimitris,
      There is no CreateResponse method in MVC core by default. Check the following Stack Overflow thread for a possible alternative.
      Let me know if you have any further questions.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.