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
That's because you can't equate a Guid and a string.
So you need to convert the Guid to string first. Normally I'd suggest:
where C.CustomerId.ToString().Equals(customerProfileId)
but ToString()
doesn't exist in Linq to Entities.
The answer to this question - Problem getting GUID string value in Linq-To-Entity query - will probably help.