首页 新闻 赞助 找找看

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

0
[已解决问题] 解决于 2018-09-12 23:07

使用 官方 的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'.

SpeakHero的主页 SpeakHero | 初学一级 | 园豆:31
提问于:2018-03-11 21:22
< >
分享
最佳答案
0

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

奖励园豆:5
dudu | 高人七级 |园豆:31075 | 2018-03-12 09:00
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册