.Net Web API boilerplate
A boilerplate / template for a WebAPI server based on ASP.Net.
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 business library and model projects for code separation.
- 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.
Before using the code in production
Change the following values
- In Config.cs in Core.Constants
- In appsettings.json
- Database connection string.
- JWT secret, issuer and audience
- In launchsettings.json,
- Change SSL port
- Change applicationURL
- In Base class in BusinessLib, 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