ITPub博客

首页 > 应用开发 > > net core ef for mysql bool 类型字段定义问题

net core ef for mysql bool 类型字段定义问题

作者:hooman 时间:2019-09-17 09:48:01 0 删除 编辑

RT,以前的ef for mysql ,定义c# bool, mysql tinyint(1),来存储bool 值,net core 里边会报错, Unable to cast object of type 'System.Boolean' to type 'System.SByte'.

如果用bit(1),好像值更新有问题, false 也会存成1, 这个问题有遇到的吗?

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1273/viewspace-3129962/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-04-15

  • 博文量
    120
  • 访问量
    1201