Skip to content

pinterweb/dotnet-solution-template

Repository files navigation

Dotnet Solution Template

Layered dotnet solution template decorated with services

Inspired by solidservices and powered by Simple Injector to provide rich service decoration for your business needs. For project definitions see the main README that goes along with new applications.

Installation

  1. git clone https://github.com/pinterweb/dotnet-solution-template.git
  2. cd dotnet-solution-template
  3. .\install.bat or sh ./install.sh
    to uninstall run .\install.bat u or sh ./install.sh u

Docker

  1. docker-compose run --rm --service-ports dotnet-sln-template bash
  2. sh ./install.sh

Testing

  1. cd CSharp\src
  2. dotnet test

Running the webapi

The webapi project can be run without creating a new application

  1. cd CSharp\src\BusinessApp.WebApi
  2. dotnet watch run
    read the "Getting Started" sections in each project's README to determine the data and services needed

Creating a new app

To create a new solution with all the defaults run:

dotnet new sln-layers -n <your-app-name> -o <your-app-directory>

The default setup gives you:

  • git directory
  • git hooks to run tests on commits
  • JSON parsing with System.Text.Json
  • Docker setup
  • Bogus for fake data generation in development

To see all the available template options run:

dotnet new sln-layers --help

Once you installed your new app do not forget to:

  • Add something in your CONTRIBUTING
  • Commit your code to source control (e.g. feat(all): Add initial infrastructure)
  • Add your continuous integration assets (e.g. azure-pipeline.yml)
  • Commit your code to source control (e.g. chore(build): Add build/release assets)

For Docker:

  • Add extra dependencies in your docker development container by setting the CONTAINER__EXTRA_DEPS environmental variable
  • Copy over any custom root CA certs to get NuGet to work and set the USER__CA_CERT environmental variable

About

A dotnet core controllerless web api solution template to help you get started

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages