我在linqtoentityframework代码下方收到此错误“运算符‘==’无法应用于‘System.Guid’和‘string’类型的操作数”。在下面的代码中,CustomerId是Guid,customerProfileId是字符串。varaccountQuery=fromCinCustomerModel.CustomerProfilewhereC.CustomerId==customerProfileId//ErrorhereselectC; 最佳答案 您不能直接将Guid与字符串进行比较。将字符串转换为Guid或将Gui