Ana içeriğe geç
Bu sayfa henüz Türkçeye çevrilmedi; İngilizce sürümü gösteriliyor.
Versiyon: 11.0

Getting Started

You can create a project from the templates with the .NET CLI or from Visual Studio.

Create a project with the CLI​

  1. Install the latest .NET SDK and Visual Studio 2022.

  2. Install the templates:

    dotnet new install Milvasoft.Templates
  3. See the options of the project template:

    dotnet new milvonion --help
  4. Create the solution:

    dotnet new milvonion -n MyApp

    Then follow the README.md of the generated solution (requirements, first migration, tests). The same steps are described in Milvonion Template.

  5. To add a CRUD feature, run this in the solution root:

    dotnet new mediatr-crud -n Product --projectName MyApp --pluralName Products

    See MediatR CRUD Template.

Create a project with Visual Studio​

  1. Install the latest .NET SDK and Visual Studio 2022.
  2. Install the templates:
    dotnet new install Milvasoft.Templates
  3. Close all Visual Studio instances.
  4. Open Visual Studio and click Create New Project. Search for "Milva", select the template and click Next.
  5. From here the steps are the same as with the CLI.

Template options​

dotnet new milvonion accepts these options:

OptionDescriptionDefault
FrameworkTarget framework. Only net11.0 is supported.net11.0
RoutePrefixThe API route prefix.api
HttpPortThe application's HTTP port.5000
HttpsPortThe application's HTTPS port.5001
PostgreConnectionStringYour PostgreSQL connection string with the database name. It is written only into appsettings.Development.json.a placeholder
NullableNullable annotations and warnings context: enable, disable, warnings or annotations.disable

Every generated project gets its own user secrets ID, so two projects never share a user secrets store.

Uninstall​

dotnet new uninstall Milvasoft.Templates