Skip to content

Introducing Dev Adventures .NET Core project template.

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 Option and Either by reading this short article.

The template is available in the Visual Studio Marketplace.

After installing the VSIX it will become available under Visual C#.

template-in-vs

Dev Adventures .NET Core Web API Template

  • AutoMapper
  • EntityFramework Core with SQL Server and ASP.NET Identity
  • JWT authentication/authorization
  • File logging with Serilog
  • Stylecop
  • 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

swagger-ui

  • Global Model Errors Handler

model-errors

  • Global Environment-Dependent Exception Handler

Development
exception-development

Production
enter image description here

  • Neatly organized solution structure
    solution-structure
  • Thin Controllers
    thin-controllers
  • Robust service layer using the Either monad.
    either-monad
  • Safe query string parameter model binding using the Option monad.
    optional-binding

Test Suite

  • xUnit
  • Autofixture
  • Moq
  • Shouldly
  • Arrange Act Assert Pattern

sample-test

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *