abp去掉AbpUser中的Name,Surname,去掉姓和名分离

abp是国外的框架,默认的框架中的AbpUser表中的Name和Surname是分开的,这不符合国情;可以先去掉

1. 在User类中重写Name和Surname,并设置为私有

2. 在DbContext类中,重写OnModelCreating

3. 添加数据库迁移

4. 修改User相关的Dto: UserDto和CreateUserDto,在ContosoAbp.Application项目下的Users/Dto文件夹下

5. 修改Users相关的界面:分别是ContosoAbp.Web.MVC项目下的Views/Users下的Index.cshtml和_EditUserModal.cshtml,注释掉Name,Surname,FullName相关的内容,至此修改完成,以后可以对user表添加其他属性

原文地址:https://www.cnblogs.com/AlexanderZhao/p/11917516.html