Fluent query Syntax and query expression syntax

string names[]= {“name1″,name2”};

Fluent Query syntax= query with predicates

IEnumerable query=names.Where(n=> n.Contains(“a”);

Query expression Syntax
IEnumerable query =from name in names
where name.Contains(“a”)
select name;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: