Suppose I have a table Person(PersonID, Name, ....). Then I use EF to create a Entity model and then create DomainService based on Ria Service. At client side(sliverlight), I try to create a dynamic linq for filter function. What I did is:
q = EntityQuery<MyData.Person>
q = q.Where(p=> p.Name.Contains(NameVar));
That is fine. Then I have another two tables for phone:
Phone(PhoneID, PhoneNumber, ...)
PersonPhone(PersonID, PhoneID, ...)
Then I want to add filter to match PhoneNumber. How to write the linq query q like?
q = q.Where(p => p.PersonPhone.
Where(ph=>ph.PhoneNumber.Contains(PhoneVar)&& ph.PersonID == p.PersonID).Count()>0);
I can pass the compiliation, but when run the app, I got error: Query operator Count is not supported
How to resolve this problem?