Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OData-like routes in ASP.NET MVC

Is there a simple way for creating asp.net mvc application with routes based on OData uri conventions http://www.odata.org/developers/protocols/uri-conventions ?

It's like a just adding new html format for specification.

Or may be another way for converting Urls into LINQ queries dynamically?

like image 599
Vitaly Baum Avatar asked Feb 18 '11 14:02

Vitaly Baum


1 Answers

You could use a Domain Service Class which the wizard allows you to expose its methods as Odata out of the box. Just cause its MVC does not mean you can not attach on WCF etc.

Take a look at this blog post http://blogs.msdn.com/b/brada/archive/2010/03/16/silverlight-4-ria-services-ready-for-business-exposing-odata-services.aspx

It explains how to use A Domain Service class to expose ODATA.

like image 154
Dimentox Avatar answered Oct 16 '22 05:10

Dimentox