0

Possible Duplicate:
.NET LINQ query syntax vs method chain

Are there any performance differences between writing a LINQ statement like this:

var result = (
from u in Users 
where u.Searchable.Contains(searchString) 
select u);

vs. like this:

var result = 
Users.Where(u=>u.Searchable.Contains(searchString));
Community
  • 1
  • 1
Subliminy
  • 364
  • 4
  • 15

1 Answers1

1

There is no performance difference as the first query is just syntactic sugar for the second one.

Enigmativity
  • 113,464
  • 11
  • 89
  • 172