I have This Linq Query
Regex pattern = new Regex("[()\n-]");
return (from c in data.Table1
join cv in data.Table2 on new {c.ClientID, c.EmailAddress} equals new {cv.ClientID, cv.EmailAddress}
where (c.ClientID == clientid && pattern.Replace(c.CellPhone, "") == phone)
select cv.RecipientID).FirstOrDefault();
I am replacing the special characters from the CellPhone. For instance, if Phone Cellphone number is (123)456-7890 I want number in 1234567890
But I am getting this error :
LINQ to Entities does not recognize the method 'System.String Replace(System.String, System.String)' method, and this method cannot be translated into a store expression.