使用EF查询数据是报下面的错,请高手指点
问题描述:
“System.InvalidOperationException”类型的异常在 EntityFramework.dll 中发生,但未在用户代码中进行处理
其他信息: The specified cast from a materialized 'System.Guid' type to the 'System.String' type is not valid.
答
newid函数返回guid,和你的string类型不兼容。