Prototype .NET Core API implementation (work in progress).
Check out the API on Azure App Services.
- .NET Core 2.0 SDK
- Docker to run dependencies (IdentityServer4 and SQL Server) locally. Please note that Microsoft SQL Server on Linux for Docker requires at least 3.25 GB of RAM.
git pull firstname.lastname@example.org:robyvandamme/dotnetcore-api.git
docker-compose up -d
dotnet run -p src/RestApi/RestApi.csproj --server.urls=http://localhost:8081
- The API should be available at
- NodeJS with NPM and Autorest if you want to regenerate the integration test clients.
- Microsoft SQL Server with the AdventureWorks database: Docker image and Github repo
- IdentityServer4: Docker image and GitHub repo
- Dependency injection using Autofac
- Configurable logging using Serilog
- API documentation generation Swashbuckle and Swagger/ Open API
Dapper and Dapper ContribEntity Framework Core for SQL Server data access
- Automapper for object mapping
- Authentication and authorization using IdentityServer4
- Multiple access levels (admin, public)
- Configurable CORS
- Configurable rate-limiting
- Global exception handling and logging
- Request logging
- HTTP caching using both Entity Tags and Response Cache
- GET, POST, PUT, DELETE, PATCH
- GET with paging, ordering, searching, filtering and customizable result fields
- API integration tests using a strongly typed Autorest API client.
- Unit tests and integration tests using xUnit
- Code analysis using StyleCop
Build and deployment
Continuous integration and delivery to Azure App Services using Visual Studio Team Services.
- For now not using the integration test server, but just running the api and running the tests against that since that is the setup for CI as well.
- To use the correct config for dev (local), make sure the enviroment is set correctly to Development before running the tests. (https://dotnetcoretutorials.com/2017/05/03/environments-asp-net-core/)
Generating AutoRest clients
npm run gen-public
npm run gen-admin