Question

Why would you want to use something like Simply Restful Routing from MVCContrib? When creating a new item, why would you want an action method called New and an action method to handle the post request called Create? Why not just create 2 methods called Create? The same goes with edit and delete.

Was it helpful?

Solution

Why not just create to methods called Create?

It's more a convention than anything else. People working with RESTful systems are used to it. So someone/something not familiar with your application and willing to create a new item will GET /item/new because that's the convention. If you used Create he will need to contact you, read your documentation, ... in order to discover this because you have not used standard convention in your application.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top