为了账号安全,请及时绑定邮箱和手机立即绑定

关于mysql 使用ef core不能映射guid的问题

关于mysql 使用ef core不能映射guid的问题

qq_笑_17 2018-08-14 11:10:28
使用 官方 的efcore for MySQL  不映射guid字段 System.InvalidOperationException: The property 'NotificationInfo.Id' could not be mapped, because it is of type 'Guid' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
查看完整描述

1 回答

?
米脂

TA贡献1836条经验 获得超3个赞

可以试试通过string类型的实体属性中转一下


查看完整回答
反对 回复 2018-09-14
  • 1 回答
  • 0 关注
  • 1754 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号