Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timdeschryver/odatasandboxapi
https://github.com/timdeschryver/odatasandboxapi
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/timdeschryver/odatasandboxapi
- Owner: timdeschryver
- Created: 2022-03-19T21:06:41.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-21T11:47:31.000Z (almost 3 years ago)
- Last Synced: 2024-10-28T04:29:48.354Z (2 months ago)
- Language: C#
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ODataSandboxApi
## Start
Start the API with the following command, this also creates and seeds a SQL Server database.
```bash
dotnet run
```## Normal Endpoint
- https://localhost:7103/students
## OData-fied Endpoints
- https://localhost:7103/orest/students
- https://localhost:7103/orest/students?select=firstMidName,lastName
- https://localhost:7103/orest/students?select=firstMidName,lastName&filter=startsWith(lastName, 'A')
- https://localhost:7103/orest/students?select=firstMidName,lastName&filter=startsWith(lastName, 'A')&orderBy=lastName&take=2&skip=1&count=true
- https://localhost:7103/orest/students?expand=Enrollments(expand=Course(select=title))
- https://localhost:7103/orest/students?compute=concat(concat(LastName, ' '),FirstMidName) as name&select=name
- https://localhost:7103/orest/students?expand=Enrollments(expand=Course(select=title);select=Grade;filter=grade eq 'A')
- https://localhost:7103/orest/students?expand=Enrollments&count=true&top=2&skip=1## Docs
- https://docs.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/
- https://www.odata.org/documentation/
- Example endpoints: https://www.odata.org/getting-started/learning-odata-on-postman/