Here is my class:
public class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string FullName { get { return FirstName + " " + LastName; } }
}
Here is my list:
var persons = new List<Person>();
persons.Add(...);
persons.Add(...);
etc.
If I try and search the list via the "calculated" property FullName as follows:
return persons.Where(p => p.FullName.Contains("blah"))
I get the following error:
System.NotSupportedException: The specified type member 'FullName' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
How can I get around this?