Using .Net v6 C#, Data API Builder 0.9.7, PostgresQL to store data
You need dotnet CLI
check dotnet version dotnet --version
or use Visual Studio
instead
1: Clone with git.
git clone https://github.com/raulcv/dab-rest-graphql-api
2: Install azure dap dotnet pkg with dotnet CLI
dotnet tool install --global Microsoft.DataApiBuilder
3: Configure your database environment
Copy and Paste > Run sqldefinition.sql file in your postgresQL server.
Create a .env
file and include a: my-db-connection-string='with-your-connection-string'
Finally RUN
dab start
You did it!!!
REST API
GET /api/Book/id/1000
GraphQl Api
{
books(first: 5, orderBy: { title: DESC }) {
items {
id
title
}
}
}
With ❤️ by raulcv