Probably all of you have gone through the struggle of manually setting up a project each time an idea strikes you.
So much time is wasted creating assemblies, setting up folder structure, configuration, authorization, authentication, tests and so on and so on that I decided that this should all fit into an easy to install multi-project template that is available to everyone.
Of course it couldn’t go without a functional touch. So I’ve included the
Option monad for query string parameters binding and the
Either monad for handling exceptions from the Services layer.
Get familiar with
Eitherby reading this short article.
The template is available in the Visual Studio Marketplace.
After installing the VSIX it will become available under Visual C#.
Dev Adventures .NET Core Web API Template
- EntityFramework Core with SQL Server and ASP.NET Identity
- JWT authentication/authorization
- File logging with Serilog
- Neat folder structure
├───src │ ├───configuration │ └───server │ ├───MyProject.Api │ ├───MyProject.Business │ ├───MyProject.Core │ ├───MyProject.Data │ └───MyProject.Data.EntityFramework └───tests └───MyProject.Business.Tests
- Swagger UI + Fully Documented Controllers
- Global Model Errors Handler
- Global Environment-Dependent Exception Handler
- Neatly organized solution structure
- Thin Controllers
- Robust service layer using the Either monad.
- Safe query string parameter model binding using the Option monad.
- Arrange Act Assert Pattern