1.在DBContext类加标签[DbConfigurationType(typeof(MySql.Data.Entity.MySqlEFConfiguration))]

2.在Nuget控制台输入update-database,回车,这时可能会报 nvarchar('max')错误

3.打开mysql workbench,找到数据库,删除所有表

4.在Nuget中输入 Add-Migration 'xxx' -Force,  xxx表示你的Migration名称,回车

5.输入update-database,回车

相关文章:

  • 2022-12-23
  • 2021-06-03
  • 2023-03-18
  • 2021-08-02
  • 2021-12-25
猜你喜欢
  • 2021-05-10
  • 2021-09-03
  • 2021-07-09
  • 2021-07-21
  • 2021-06-02
相关资源
相似解决方案