I have recently discovered LINQ and it's great! I have been shown examples using LINQ extensions and query operators
i.e
Console.WriteLine("List of Departments");
// var depts = (empTree.Select(d => d.Department).Distinct());
var depts = (from d in empTree
select d.Department).Distinct();
foreach( var d in depts)
{
Console.WriteLine("Department {0}", d);
}
I know SQL so query operators are nice but as I'm new to LINQ I don't mind learning one over the other if it is considered better practice.
Also,
Can you use LINQ instead of creating SQLAdapters, SQLCommands, DataSets etc? My project is going use databases a lot and I've heard LINQ can help with development speed
Many thanks and Happy New Year!
Mike

New Topic/Question
Reply




MultiQuote






|