Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Akkiraju IvaturiRank #473 · 5.3K reputationPosted Aug 11, 2012, 12:19 PM EDT
Sukesh MarlaRank #461 · 5.4K reputationPosted Aug 11, 2012, 10:16 PM EDT
Think in terms of sql and .net
In .net if we want something we write logic(such as for sorting,grouping and filtering) where as in sql we just ask or just declare that we want this.
Using linq we can write such declarative logic in .net
we have Linq to sql(using dbml), Linq to XML and Linq to Objects.
Example:-
DataTable Dt=//....
var Employees=Dt.AsEnumerable().where(x=>x.Field
.select
(
new
{
Department=y.Field
Name=y.Field
}
);
.
.
.
foeach(var e in Employees)
{
//e.Department e.Name
}
Hope It Helped. Please Check This is Currect Answer.
Prabhu RajaRank #861 · 2.6K reputationPosted Aug 11, 2012, 10:52 PM EDT
Language Integrated Query that can be used to query data from datasources like XML, set of Objects and Database Table. We can retrieve data from all datasources, which have been implemented IEnumerable<> Interface.
You can get an Examples for All Operations that we do in Proc and Functions in Databases to Query data from here ,
http://code.msdn.microsoft.com/101-LINQ-Samples-3fb9811b