Linq to ... and Lambda Expressions -


i have big question has been puzzling me long time , can't seem straight answer anywhere , sure if can answer authority , examples not me thousands of developers come. want know characteristics of following concepts , differences between them

linq

linq sql

linq entities

linq objects

lambda expressions

also, in particular, can tell constructs such these fall above categories

construct 1

var result = n in nums              n < 5              orderby n              select n; 

construct 2

entities.person.where(p => p.firstname == "john").first(); 

your learned clarifications eagerly awaited.

i'm sure there over-simplifications here, it's worth:

linq api designed dealing data sets. iqueryable, instance, comes system.linq namespace. linq ... different implementations parse same linq instructions perform different operations based on how data stored. linq sql parse .where instruction produce sql query where clause, while linq objects take same instruction , produce foreach.

a lambda expression pretty shorthand anonymous delegate. identify lambda => operator. argument list @ left hand of => , expression can access arguments , optionally return result @ right hand.

your 2 code examples different syntaxes in linq queries can written. called query syntax , method syntax, respectively.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -