Entity Framework MySQL tinyint(1) System.Boolean.Parse FormatException

后端 未结 3 468
梦如初夏
梦如初夏 2021-01-12 01:18

I\'m using EntityFramework 6 in my C# model-first project which using a MySQL database. Everything was fine and I could ge

3条回答
  •  灰色年华
    2021-01-12 02:06

    If you are doing this DB first, simply change the TINYINT(1) types to BIT(1), assuming you really want a Boolean. You may have to update the default values also (to bit syntax such as b'0'). EF will still translate these to Boolean values in your entities.

提交回复
热议问题