score:2
Accepted answer
var blueWindowHouses =
from h in houses
where h.Windows.Any(w => w.Color == blueOne.Color)
select h;
score:2
return houses.Where(house => house.Windows.Any(window => window.Color == blue))
.ToList();
Source: stackoverflow.com
Related Query
- Filter a list of objects using a property that is another list. Using linq
- sorting list of objects by 2 property of that objects using linq
- Filter list of entity objects by string child object property using Linq Lambda
- Extracting a list of objects that exist in another list objects using linq
- Linq - Filter list property that is inside another list by a list of strings
- Linq - get objects with a list property that does not contain values in another list
- Update a property on objects in a list and add it to another list without editing the original list using LINQ
- How do i group a list of dynamic objects using linq given that the property names are dynamic?
- Group objects in List by property in object that is List using LINQ
- Using LINQ to Objects to find items in one collection that do not match another
- Remove items from list that intersect on property using Linq
- Change the property of objects in a List using LINQ
- Select property of an object that is in a list of objects which is also in another list of objects
- Using Linq to group a list of objects that contains primitives data into a new grouped list of objects
- How to fill a property of an object from another list using LINQ
- Using LINQ to filter a list of items based on those items' presence in another list
- Filter a list of objects using LINQ
- Using LINQ to get the difference between two list of objects based only on a single object property
- C# LINQ - Return a typed filtered list based on a child property that is inside another list
- How to select objects from a list that has a property that matches an item in another list?
- LINQ query using list of objects property of an object
- Using LINQ I have a list of lists, how do I select all objects that exist in every list?
- Find all objects in one list that have a property that matches a property in another list of objects
- Using linq group by to get from a list of objects with a DateTime property to a list with an interval StartDate, EndDate
- C# Using LINQ to filter each Object with Max Value in List of Objects
- Get the objects with the maximum value for a specific property from a list using LINQ
- C# LINQ Filter list of complex objects by sub-list using a list of values
- Creating a list of objects belonging to another class using linq
- Trying to Filter a collection using LINQ where the collection has a collection which also has a collection with a property that is nullable
- Filter Out List with another list using LINQ
More Query from same tag
- LINQ sum and groupby and return empty records?
- How to filter an object list based on an unknown property
- Linq Distinct in one line
- Entity Framework 6 context not retrieving navigation properties
- List sum too large, throwing overflow exception
- List.FindAll don't returns a result set
- Linq Select nested lists
- Return TRUE for ALL when specific property is smaller then other property for both lists
- How to map two lists using linq
- Unexpected result while generating string with Aggregate() in linq
- Unable to group by DataTable
- Form a multidimensional cartesian product array
- Select distinct without creating IEqualityComparer
- Anyway to select both recent posts and recent threads
- LINQ groupby, divide and extract
- Looping through a viewmodel and updating a value in my C# MVC app
- How could I modify this query to get what I want - Calendar dates
- Problem applying Where and Take in LinQ
- How to remove list element?
- Linq Lambda expression - left join
- Truncate Time Converting list to nullable
- Remove elements in List<T> that are in Tuple<T1,T2>
- How to write `Aggregate` in `from .. in ..` notation?
- linq and string array
- Copying an IEnuemrable<T> - linq Select not functioning as expected
- LINQ two Where clauses
- How to find closest string in list
- Linq wild card search with Sql Functions.Pat Index for multiple columns
- How to pick IEnumerable<T> instead of List<T> from an ICollection<T>?
- Converting XElement into XmlNode