A turn-key library for building RESTful services
C# 1C Enterprise Other

README.md

RESTier

1. Introduction

OData stands for the Open Data Protocol. It was initiated by Microsoft and is now an ISO and OASIS standard. OData enables the creation and consumption of RESTful APIs, which allow resources, defined in a data model and identified by using URLs, to be published and edited by Web clients using simple HTTP requests.

RESTier is a RESTful API development framework for building standardized, OData V4 based RESTful services on .NET platform. It can be seen as a middle-ware on top of Web API OData. RESTier provides facilities to bootstrap an OData service like what WCF Data Services (which is sunset) does, beside this, it supports to add business logic in several simple steps, has flexibility and easy customization like what Web API OData do. It also supports to add additional publishers to support other protocols and additional providers to support other data sources.

For more information about OData, please refer to the following resources:

For how to adopt this library to build OData service, please refer to the following resources:

For how to adopt .NET OData Client to consume OData service, please refer to the following resources:

Please be noted that currently RESTier is still a preview version.

2. Project structure

The project currently has two branches: master, gh-pages.

master branch

The master branch has the following libraries:

  • RESTier Core (namespace Microsoft.Restier.Core):
    The RESTier Core contains framework classes like API-related logic, query inspector/filter/expander/sourcer/executor, convention-based logic like model builder.
  • RESTier OData Publisher (namespace Microsoft.Restier.Publishers.Odata):
    The RESTier OData Publisher contains classes to publish the data source as an OData service based on Web API OData.
  • RESTier EntityFramework Provider (namespace Microsoft.Restier.Providers.EntityFramework):
    The RESTier EntityFramework Provider contains classes to access data sources exposed with Entity Framework library.
  • RESTier Security (namespace Microsoft.Restier.Security):
    The RESTier Security contains classes and methods for security control, it is not in active development state and will not be part of first GA release.

For these libraries, we accept bug reports, feature requirements and pull requests.

gh-pages branch

The gh-pages branch contains documentation source for RESTier - tutorials, guides, etc. The documentation source is in Markdown format. It is hosted at RESTier Pages.

3. Building, Testing, Debugging and Release

LocalDB v12.0 or above will be used which is part of VS2015 and no additional installation is needed. The Database will be automatically initialized by the test code if it doesn't exist.

3.1 Building and Testing in Visual Studio

Simply open the solution files in root folder and build them in Visual Studio 2015.

Here is the usage of each solution file:

  • RESTier.sln - Product source and all tests. It uses EntityFramework 6.x and built with .Net Framework version 4.5.1.
  • RESTier.EF7.sln - Product source and all tests. It uses EntityFramework 7.x and built with .Net Framework version 4.5.1.

3.2 One-click build in command line

Open Command Line Window, cd to the root folder and run following command:

build.cmd

The build will take about 4 minutes. Tests are recommended to run with Visual Studio.

3.3 Debug

Please refer to the How to debug.

3.4 Official Release

The release of the component binaries is carried out regularly through Nuget.

4. Documentation

Please visit the RESTier pages. It has detailed descriptions on each feature provided by RESTier.

5. Sample services

Refer to sample service github for end to end sample service. The source code also contains end to end service for end to end test purpose. All the sample service can be run with visual studio 2015.

6. Community

6.1 Contribution

There are many ways for you to contribute to RESTier. The easiest way is to participate in discussion of features and issues. You can also contribute by sending pull requests of features or bug fixes to us. Contribution to the documentations is also highly welcomed. Please refer to the CONTRIBUTING.md for more details.

6.2 Support

Thank You!

We’re using NDepend to analyze and increase code quality.

NDepend

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.