ater.web.templates 9.0.0

dotnet new install ater.web.templates::9.0.0
                    
This package contains a .NET Template Package you can call from the shell/command line.

说明

本仓库包含了Ater.Web 相关内容的源代码。主要包括:

  • templates:dotnet 模板内容
  • 基础包:templates\ApiStandard\src\Infrastructure
  • analyzer:分析器项目

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

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

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

版本

版本 .NET版本 支持
8.x .NET8 当前版本
9.x .NET9 预览

文档

请查阅使用文档

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

安装

使用源代码安装

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

使用Nuget安装

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

dotnet new --install ater.web.templates --preview

创建项目

dotnet new atapi  

or

dotnet new atapi -n <projectname>

数据库

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

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

数据迁移

移除了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
9.0.0 232 5/8/2025
8.2.3 272 7/23/2024
8.1.0 396 4/3/2024
8.0.2 804 3/1/2024
8.0.1 508 2/19/2024
8.0.0 634 2/6/2024
8.0.0-rc1 694 1/17/2024
7.1.2 764 5/24/2023
7.1.1 360 5/18/2023
7.1.0 346 5/15/2023
7.1.0-rc2 447 4/21/2023
7.1.0-rc1 457 4/15/2023
7.0.2 556 2/15/2023
7.0.1 636 11/27/2022
7.0.0-rc2 480 11/23/2022
7.0.0-rc1 465 11/22/2022
7.0.0-pre1111 526 11/11/2022
7.0.0-pre0929 569 9/29/2022
7.0.0-pre09 576 9/28/2022
6.0.0-beta1 539 8/11/2022
1.1.0 755 6/21/2022
1.0.2 689 5/18/2022

1. Update package version
2. use .NET Aspire