dotnet-web-api-boilerplate
dotnet-web-api-boilerplate copied to clipboard
A boilerplate / starter template for Web API server based on ASP .Net.
.Net Web API boilerplate
A boilerplate / template for a WebAPI server based on ASP.Net.
Scope
This API boilerplate includes the following:
- Role based JWT authentication.
- Web API Helpers which standardizes responses, maps errors, etc...
- An implementation of CSV Error logger.
- A core library with the following
- Custom data model attributes
- Database adapter
- Helper functions for hashing, encrypting, compression, random number & character generation, etc...
- A constants library for commonly used constants.
Notice
Before using the code in production
Change the following values
- In appsettings.json
- Database connection string.
- JWT secret, issuer and audience
- In Base class in Operations, uncomment the line that establishes db connection
- Update the login controller & user lib.
- This project has a default editorconfig file. If needed customize it.
Remove the following
- Values controller & values lib