Nano ASP.NET SaaS Boilerplate
Admin credentials (all tenants): admin@email.com / Password123!
Sample data resets every hour
Nano ASP.NET SaaS Boilerplate
General
.NET Solution
Vue UI
React UI
Razor Pages
.NET Solution

Using the CLI Tool

After installing the Nano.Boilerplate NuGet package, new projects can be created by selecting the Nano Boilerplate template from the template list in Visual Studio. Alternately, you can use the terminal to generate code from the command line. When creating new projects, you can provide specifications for multi-tenancy and front-end UI options. The cli tool can be used to scaffold code for services and controllers as well.

Here is a quick reference tool for the cli commands:

Terminal
Name your project
Multi-Tenant Options
UI Options

With the command dotnet new nano you can scaffold a Nano boilerplate project. Type –h (help) to see a list of option parameters.

You can name your project with the name parameter –n. For example:

dotnet new nano –n MyApp

The –m parameter specifies the multi-tenancy type. The options are:

  • multidb (multi-database, multi-tenancy)
  • singledb (single-database, multi-tenancy)
  • singletenant (single tenant)

If no option is specified, the default setting for multi-tenancy is multidb.

The –ui parameter specifies how things will be set up for the front-end. The options are:

  • spa (single page application, React / Vue)
  • razor (server-side pages, MVC)

If no option is specified, the default setting is spa. This is the option you should choose if planning to build with React, Vue, or any other kind of single page front end. This parameter is only available in the full version of the boilerplate.

You can also select the project template in Visual Studio. Once installed, the Nano Boilerplate will appear as a new option in the list of project templates:

Within a project, new services with CRUD operations can be generated with the command dotnet new nano-service. In the terminal, navigate to the location where the service should be created; typically that’s Application/Services.

Provide a singular name –s, plural name –p, and the name of the application –ap. For example:

dotnet new nano-service –s Supplier –p Suppliers –ap MyApp

This will create a folder with the class, interface, DTOs, filters, and specifications for the new service. If using Razor pages, another parameter –ui razor should be passed to ensure the pagination endpoint is created appropriately.

New API Controllers can be created with the command dotnet new nano-controller. In the terminal, navigate to the location where the controller should be created; typically in WebApi/Controllers (or RazorApp/Controllers).

Provide a singular name –s, plural name –p, and name of the application –ap. For example:

dotnet new nano-controller –s Supplier –p Suppliers –ap MyApp

This will create an API controller in the location specified. If you are using Razor pages, another parameter –ui razor can be passed to ensure the pagination endpoint is created appropriately.

Learn about the .NET back-end in the Solution Overview guide