LINQ to Entities does not recognize the method 'System.String[] Split(Char[])' method, and this method cannot be translated into a store expression.
Im trying to convert the string to int as an array.
public class EmpFields2WithGroup
{
public int EmpID { get; set; }
public string Name { get; set; }
public string Cell { get; set; }
public List<int> grpID { get; set; }
}
List<EmpFields2WithGroup> Emp = new List<EmpFields2WithGroup>();
Emp = db.EmpGrpViews.Select(x => new EmpFields2WithGroup { EmpID = x.ID, Name = x.Name, Cell = x.Cell, grpID = x.GroupIds.Split(',').Select(int.Parse).ToList()}).ToList();