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

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

2. 在DbContext类中,重写OnModelCreating

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

3. 添加数据库迁移

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

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

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

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

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

相关文章:

  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2021-10-31
  • 2021-07-29
  • 2022-03-08
  • 2022-12-23
  • 2021-11-18
  • 2021-12-04
  • 2022-12-23
相关资源
相似解决方案