首页 > 其他 > 详细

abp 开发备忘录

时间:2020-12-14 14:45:08      阅读:47      评论:0      收藏:0      [点我收藏+]

一、建立abp项目
1 通过abp官网https://aspnetboilerplate.com/,官网有生成abp项目的快速方式,可以选择生成augular,react ,vue的前端,也可以用asp.net的mvc

2 通过abp cli搭建
1)安装或升级abp cli
abp cli是使用ABP框架启动新解决方案的最快方法,那么前提是需要安装
dotnet tool install -g Volo.Abp.Cli
如果你的版本比较低,使用下面命令进行更新
dotnet tool update -g Volo.Abp.Cli
2)使用方法,请参考 https://docs.abp.io/en/abp/latest/CLI
使用命令abp new 创建项目
二、使用abphelper快速生成代码
参考https://github.com/EasyAbp/AbpHelper.CLI
1)Install AbpHelper CLI tool
dotnet tool install EasyAbp.AbpHelper -g

 update it with the following command:
    dotnet tool update EasyAbp.AbpHelper -g

2)建立领域模型
public class Todo : FullAuditedEntity
{
public string Content { get; set; }
public bool Done { get; set; }
}
abphelper generate crud Todo -d C:\MyTodo

   generate crud is a sub command to generate CRUD files,Todo specified the entity name we created earlier-d specified the root directory of the ABP project, which is created by the ABP CLI
   AbpHelper will generate all the CRUD stuffs , even include adding migration and database updating!

3)Run the DbMigrator to seed the database

abp 开发备忘录

原文:https://www.cnblogs.com/charlesyuan/p/14132747.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!