Good afternoon,
I have three entities (that concern this question)
Company (ID, etc..) CompanyAddress (AddressID, CompanyID, Rank) AddressDetails (AddressID, Street, City, State, Zip)
The reason Rank and company id aren't in the AddressDetails is because the address detas are shared with contacts via a ContactAddress entity.
Anyway, I need to build an IQueryable given an IQueryable that will check if a string is contained in the City (and eventually or state). I'd like to use Lambda expressions not the from c in companies
syntax...I tried
query = query.Select(c => c.Addresses.Where(a => a.AddressDetails.City.Contains(City)).Select(ca => ca.Company));
In this example c.Addresses is the navigation property for CompanyAddress.
Thanks for any help,
Paul