小编use*_*184的帖子

运算符'=='不能应用于linq到实体的'System.Guid'和'string'类型的操作数

我收到此错误'运算符'=='无法应用于linq类型'System.Guid'和'string''的操作数到代码下面的entityframework.在下面的代码中,CustomerId是Guid,customerProfileId是字符串.

var accountQuery = from C in CustomerModel.CustomerProfile
                  where C.CustomerId == customerProfileId // Error here                    
                 select C;
Run Code Online (Sandbox Code Playgroud)

.net c# linq linq-to-entities entity-framework

13
推荐指数
2
解决办法
2万
查看次数

标签 统计

.net ×1

c# ×1

entity-framework ×1

linq ×1

linq-to-entities ×1