The two code snippets are equivalent, i.e. they should always produce the same results under all circumstances. Of course, that assumes that
.Contains() are what we expect them to be; if they are property getters/methods which have curious side-effects such as modifying the contents of
tracks, then anything could happen.
In other words, without knowing what the rest of your code looks like, we cannot help you, because there is no semantic difference between the two code snippets.
- When Where clause is used inside Linq statement produces different results than when used outside
- LINQ operater Where not supporting any of the members when used inside generic method
- C# LINQ performance when extension method called inside where clause
- using If statement inside where clause in LINQ
- Place if statement inside a where clause in Linq for Entity framework
- Linq Where clause to generate List based on results of a different List
- Interpreting Sql with where and having statement to linq giving different results
- Stored Procedure Results Return Null When Where Clause is Added in LINQ
- Linq Query with a Where clause in an Include statement
- linq where clause when id is in an array
- Why no intellisense when LINQ statement has no where clause?
- When using a LINQ Where clause on a Dictionary, how can I return a dictionary of the same type?
- When to use lambda expressions instead of a Where clause in LINQ
- Why does LINQ GroupBy produce different results when preceded by ToArray()?
- Linq with where clause in many-to-many EF Code First object
- Different results in Entity Framework than LINQ to SQL
- Linq Where local counter closure different results in VS watch
- Include where clause on linq query when param is not null Npgsql
- LINQ query returns old results when source list is re-initialized
- LINQ - CASE statement in WHERE clause
- Entity Framework - LINQ statement with WHERE clause based on NULLABLE parameter
- C# - Linq optimize code with List and Where clause
- Using LINQ when my where clause will contain a LIST
- In a LINQ statement using closures, is it possible to specify a where clause within a closure?
- Linq to NHibernate returns different results than HQL?
- LINQ Statement with where clause makes the execution slow
- LINQ statement where result count is used in expression's condition
- How to place an If/Else statement in a where clause in a linq query?
- Why does my Linq Where clause produce more results instead of less?
- Error "The LINQ expression node type 'Invoke' is not supported in LINQ to Entities" in where clause inside the method
- Replacing loops with linq code
- Comparing enumeration flags (bit combinations) with linq
- Remove set of elements from list A and add into list B using Linq
- Translating my SQL Query to c# linq/lambda. Multiple parameter GroupBy
- How to add in Linq to EF data in list form to Class Object C#?
- GroupBy two variables, one of them is from a nested list
- C# query basic BSON knowing only key and values using LINQ
- LINQ Filter anonymous type based on IEnumerable values within type
- convert IEnumerable<double> to double
- How to query xsi:type from an attribute using Linq to XML?
- If Element does not exist
- How to create where by list of complex clauses?
- Sum elements of the array based on index position, preferable with Linq
- syntax error in simple LINQ statement
- Why does a GC after a LINQ query free the WhereListIterator but not the Func representing the condition?
- Cannot implicitly convert type 'System.Linq.IQueryable<int>' to 'int?'
- How do I display 2 foreign keys in a view ASP.NET MVC by using LinQ
- VB.NET :For each loops with Resultset from LINQ 2 SQL
- Linq to Entities Join -- I don't want anonymous types
- How to update all rows of a table with an aggregate value referenced by foreign key on an another table in Entity Framework