Base solution for your next web application
Open Closed

REST Verbs #9906


User avatar
0
MarkEaston created

Hi,

I want to set up data APIs to be consumes by my Reporting WebApp like this: https://demodata.grapecity.com/swagger/index.html?urls.primaryName=Restful%20NorthWind

This may be a dumb question, BUT, in ASP.NET Zero it appears that I have to do the following to generate my GETs:

        public ListResultDto<OrderDataDto> GetOrders()
        public OrderDataDto GetOrder(EntityDto input)

What I really want to do is:

        public ListResultDto<OrderDataDto> Orders()
        public OrderDataDto Orders(EntityDto input)

ie

GET /api/services/app/Data/Orders
GET /api/services/app/Data/Orders/{id}

But this ends up with an error in Swagger. How can I use REST HTTP verbs properly with Data Object names such as with: https://demodata.grapecity.com/swagger/index.html?urls.primaryName=Restful%20NorthWind???

Many thanks


2 Answer(s)