string类型无法转换guid
来源:3-7 【应用】添加初始化数据

zdasdf134
2020-12-06
添加初始化数据报错:The seed entity for entity type ‘TouristRoute’ cannot be added because the value provided for the property ‘Id’ is not of the type ‘System.Guid’. Consider using ‘DbContextOptionsBuilder.EnableSensitiveDataLogging’ to see the involved property values.
写回答
1回答
-
zdasdf134
提问者
2020-12-06
已解决。AppDbContext.cs文件中touristRoutePicturesMockData泛型TouristRoute,应该是TouristRoutePicture。
10
相似问题