Operator '==' cannot be applied to operands of type 'System.Guid' and 'string' in linq to entity

前端 未结 7 855
礼貌的吻别
礼貌的吻别 2020-12-18 21:12

I am getting this error \'Operator \'==\' cannot be applied to operands of type \'System.Guid\' and \'string\'\' in linq to entityframework below code. in the below code Cus

7条回答
  •  臣服心动
    2020-12-18 21:51

    You must convert CustomerId to string (calling .ToString()) or customerProfileId to Guid (calling Guid.Parse()) and then compare them.

提交回复
热议问题