The Microsoft OData Team has made available the preview version of RESTier, a middleware development framework for building OData 4.0 RESTful APIs. RESTier is based on ASP.NET Web API.
For a client to work with a data source it has to make a request to Web API OData which forwards the request to RESTier which in turn accesses the data through a data provider. RESTier contains three basic modules: Model – producing a data model, Query – handling GET requests, and Submit – handling CREATE/UPDATE/DELETE (CUD) operations.
Currently RESTier handles the following OData features, falling back on Web API OData via attribute routing for features not supported yet:
- Basic queries for metadata and top level entities.
- $select, $expand, $filter, $orderby, $top, $skip, $orderby, $format.
- Requesting related entities.
- CUD operations on top-level entities.
- Batch requests.
It is worth mentioning that according to the OData team the RESTier framework will benefit from future enhancements of the Web API OData, and support for other data providers will be added in the future, besides the Entity Framework which is already supported.
RESTier can be installed with the following Package Manager Console command:
PM> Install-Package Microsoft.Restier -Pre
The RESTier Wiki provides more information on the framework along with basic and advanced samples for using it.