I have the following data and i want to filter the data using Linq to Entities, But i am getting the exception :
LINQ to Entities does not recognize the method 'System.String[] Split(Char[])' method, and this method cannot be translated into a store expression.
I have following data in the table
1 HPM,BKM NULL 1,2,3 2 HPM,BKM L1,L2 1,2 3 KK,CC,ZZ,PP 3,4
And i am writing the following code
var criteria_1="1"; var criteria_2="HPM," var Col4 = DB.Letter_Logic.Where(m => m.Col1.Equals(criteria_1) && m.Col2.Split(',').Contains(criteria_2)).ToList();
It should be give me values 1,2,3 as my result.