Hi,
What is the difference between comprehensive queries and lamba queries in linq.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 3, 2012, 2:55 AM
comprehensive queries Feature...
- Transparently query multiple databases in one expression e.g. a Microsoft Access Database and an SQL Server Database
- Translates function calls and property accessors in the String, DateTime and Nullable`1 classes that have SQL equivalents e.g. firstName.Length, firstName.ToUpper(), orderDate.Year, shippedDate.HasValue etc.
- Does not use MARS - Multiple Active Result Sets, an SQL Server 2005 specific feature
Lambda queryA lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
All lambda expressions use the lambda operator =>, which is read as "goes to". The left side of the lambda operator specifies the input parameters (if any) and the right side holds the expression or statement block. The lambda expression x => x * x is read "x goes to x times x." This expression can be assigned to a delegate type.
example :
my table structure as below.
Customer ==> Address ==> Contact.
comprehensive query.
from c in ctx.Contacts
where c.Address.CustomerID = 123
and
select c
Lambda Query.you may also refer :
http://msdn.microsoft.com/en-us/library/bb308959.aspx
hope this help.
AartiPosted Nov 14, 2011, 7:08 AM
Lambda expressions are the natural evolution of anonymous methods :
VulpesPosted Aug 17, 2011, 12:12 PM