一、添加Mysql引用

Dotnet Core2.1 使用CodeFirst

二、添加连接字符串

Dotnet Core2.1 使用CodeFirst

三、配置startup.cs

Dotnet Core2.1 使用CodeFirst

三、初始化数据库

  Add-Migration init

Dotnet Core2.1 使用CodeFirst

  Update-Database

Dotnet Core2.1 使用CodeFirst

Dotnet Core2.1 使用CodeFirst

四、数据迁移

  user实体添加了password

Dotnet Core2.1 使用CodeFirst

执行 Add-Migration AddPwd    
执行 Update-Database

Dotnet Core2.1 使用CodeFirst

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-23
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案