MySQLNumberTypeMapping' does not support value conversions

前端 未结 3 2106
余生分开走
余生分开走 2021-02-14 07:44

I\'ve added a few models that I used to connect to a SQL database with and are now porting to MySQL . I am getting this error when I run : dotnet ef update --context {cont

3条回答
  •  再見小時候
    2021-02-14 07:58

    The MySQL data provider does not implement the value conversion feature. You are getting this exception because you are using enums as data types which must be converted by the MySQL data provider which does not implement this feature and therefore throws a NotImplementedException.

    This bug has already been reported: https://bugs.mysql.com/bug.php?id=89855

    There is also an open github issue: https://github.com/aspnet/EntityFrameworkCore/issues/11078

    In short, MySQL.Data.EntityFrameworkCore, running on .Net Core 2.0, does not function correctly while using Microsoft.EntityFrameworkCore.Relational 2.1.0-preview1-final, despite claims that 2.0 conformant providers should work on it.

提交回复
热议问题