ITPub博客

首页 > 数据库 > > 关于mysql 使用ef core不能映射guid的问题

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

作者:supergirlxu 时间:2019-09-16 09:13:02 0 删除 编辑

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

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

下一篇: python基础
请登录后发表评论 登录
全部评论

注册时间:2019-04-12

  • 博文量
    220
  • 访问量
    1688