ater.web.templates 8.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet new install ater.web.templates::8.0.0
This package contains a .NET Template Package you can call from the shell/command line.

说明

The web framework with best practices base on ASP.NET Core.

基于ASP.NET CoreEntity Framework Core的快速开发模板,提供一个规范化的项目目录及工程结构。

集成了ater.droplet.cli代码生成工具,帮助你生成基础代码,减少重复性的代码编写工作。

版本

版本 .NET版本 支持
6.x .NET6 不再维护
7.x .NET7 仅修复Bug
8.x .NET8 当前版本

文档

请查阅使用文档

[!TIP] 如有问题,可在GitHub上提交问题,或者加入QQ群:149272857.

安装

使用源代码安装

  • 拉取源代码
  • 执行install.ps1脚本安装。

使用Nuget安装

模板已经发布到nuget上,请根据你的项目版本下载对应的模板。

dotnet new --install ater.web.templates::8.0.0-rc1

创建项目

dotnet new atapi  

or

dotnet new atapi -n <projectname>

数据库

模板默认使用PostgreSQL,如果您使用其他数据库,你需要进行的操作:

  • 修改appsettings.json等配置文件中的数据库连接字符串
  • Application项目中添加相应的数据库驱动包
  • Http.API项目Program.cs中,修改数据库上下文的注入。

数据迁移

7.0之前

项目src\Database\EntityFramework.Migrator目录下,执行脚本MigrationContext.ps1

cd src\Database\EntityFramework.Migrator
.\MigrationContext.ps1

7.0及之后

移除了EntityFramework.Migrator,迁移代码将直接生成在Http.API项目中。

可直接运行scripts\EFMigrations.ps1脚本生成迁移内容,程序在启动时会执行迁移。

cd scripts
.\EFMigrations.ps1

该脚本可跟一个参数,参数为迁移生成时的名称,如.\EFMigrations.ps1 Init .

运行项目

配置

在运行项目前,请先检查appsettings.json中的配置,以确保数据库可以正常连接.

运行后台项目

cd src\Http.API
dotnet watch run 

使用admin/Hello.Net初始管理账号登录。

  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.0 143 4/3/2024
8.0.2 658 3/1/2024
8.0.1 380 2/19/2024
8.0.0 485 2/6/2024
8.0.0-rc1 588 1/17/2024
7.1.2 645 5/24/2023
7.1.1 230 5/18/2023
7.1.0 214 5/15/2023
7.1.0-rc2 302 4/21/2023
7.1.0-rc1 318 4/15/2023
7.0.2 422 2/15/2023
7.0.1 490 11/27/2022
7.0.0-rc2 341 11/23/2022
7.0.0-rc1 327 11/22/2022
7.0.0-pre1111 377 11/11/2022
7.0.0-pre0929 413 9/29/2022
7.0.0-pre09 427 9/28/2022
6.0.0-beta1 379 8/11/2022
1.1.0 599 6/21/2022
1.0.2 538 5/18/2022

1 简化服务注册
2 增加更多配置