ASP.NET MVC和自动RESTful功能

时间:2022-07-18 04:13:58

Does ASP.NET MVC have anything like the RESTful out-of-the-box features like Ruby on Rails 2.0?
For example: cURL and Your Rails 2 App

ASP.NET MVC是否具有像Ruby on Rails 2.0这样的RESTful开箱即用功能?例如:cURL和Your Ra​​ils 2应用程序

I think this is the built in REST access to your Models. Since models can be implemented in different ways in ASP.NET MVC is there a feature like this?

我认为这是对模型的内置REST访问。由于模型可以在ASP.NET MVC中以不同的方式实现,有这样的功能吗?

2 个解决方案

#1


Inside the MvcContrib open source project there is a class called SimplyRestfulRouteHandler. Using this class you can add routes to your site that will follow the REST approach.

在MvcContrib开源项目中,有一个名为SimplyRestfulRouteHandler的类。使用此类,您可以向站点添加遵循REST方法的路由。

Here is a good post on how you can use it.

这是一篇关于如何使用它的好文章。

#2


I think the closest you'll come to this that I know of right now is some of the work Rob Conery is doing like this:

我认为现在我知道的最接近你的是Rob Conery正在做的一些工作:

http://blog.wekeroad.com/blog/subsonic-mvc-scaffold-addin/

It's not exactly what you're asking for, but it provides what you want via scaffolding instead of the cURL type implementation.

这不是你要求的,但它通过脚手架而不是cURL类型实现提供你想要的东西。

#1


Inside the MvcContrib open source project there is a class called SimplyRestfulRouteHandler. Using this class you can add routes to your site that will follow the REST approach.

在MvcContrib开源项目中,有一个名为SimplyRestfulRouteHandler的类。使用此类,您可以向站点添加遵循REST方法的路由。

Here is a good post on how you can use it.

这是一篇关于如何使用它的好文章。

#2


I think the closest you'll come to this that I know of right now is some of the work Rob Conery is doing like this:

我认为现在我知道的最接近你的是Rob Conery正在做的一些工作:

http://blog.wekeroad.com/blog/subsonic-mvc-scaffold-addin/

It's not exactly what you're asking for, but it provides what you want via scaffolding instead of the cURL type implementation.

这不是你要求的,但它通过脚手架而不是cURL类型实现提供你想要的东西。