.NETCORE3.1配合使用MYSQL数据库

     这篇是在1月份发布在自己的博客上,现在搬运到我们的博客园来

      .NetCore3.1 使用MySql.Data.EntityFrameworkCore8.0.18 连接MySql数据库异常,需要替换MySql数据库连接驱动

      今天写demo是用.net Core3.1 MySql,和以前一样添加引用MySql.Data,MySql.Data.EntityFrameworkCore 。在做数据库迁移报错,错误信息如下:

Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.


undefined

 

 

解决方案:

        1、卸载MySql.Data,MySql.Data.EntityFrameworkCore

        2、添加Pomelo.EntityFrameworkCore.MySql

posted @ 2020-11-05 16:52  无涯哒  阅读(1272)  评论(1)    收藏  举报