A simple and skeletal boilerplate for ASP.NET Core Web API projects
- Table Of Contents
- About The Project
- Built With
- Getting Started
- Usage
- Roadmap
- Contributing
- License
- Authors
- Acknowledgements
This boilerplate was built to jump start development with minimal setup and save hours configuring and setting up common functionalities in a REST API project. The project followes the N Tier Architecture. The boilerplate includes the following features
- JWT Based Authentication
- Role based Authorization
- Custom global error handling
- Auto mapping of domain entities to DB tables through Dapper Mapper classes
- Generic repository for CRUD operations
The solution has four projects that are included in it.
- Web - This is the main ASP .NET Core project.
- Domain - This is a Class Library that has all your business domain entities.
- Repository - This is a Class Library and implements the Repository pattern.
- Migrator - This is a Console Application that runs your migrations.
This project is configured with the following
- Microsoft .NET 7
- ASP.NET Core
- AutoMapper
- Dapper
- Dapper Extensions
- Newtonsoft.Json
- Swashbuckle.AspNetCore
- Fluent Migrator
All you have to do to use this boilerplate is to fork this repository and then clone the forked repository! It's that simple!
- Ensure that you have .NET 7 SDK installed.
- This project is makes use of SQLServer as the Database.
- Run the rename.ps1 file to rename all the files and update the namespaces with your project name.
.\rename.ps1 <YOUR_PROJECT_NAME>
- Update the connection strings in the Web and Migrator project to that of your database.
- Replace the admin username and password in the 20230306220822_InitialMigration.cs file. The password has to be SHA256 encoded.
- Follow the instructions in the README in the Migrator to run the migrations.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for adding or removing projects, feel free to open an issue to discuss it, or directly create a pull request.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Ranjith Shenoy - *An enthusiastic software developer * - Ranjith Shenoy - **