Just wondering why linq is more useful than datasets? The stuff I do doesn't
seem to be too complicated to use linq with it. If I did use linq with it
now, I would be doing almost the exact same programming, just with a
different data getting process...
The single BIGGEST reason to use LINQ over "traditional" ADO.NET style
programming is type safety.
If you use traditional ADO.NET with SqlConnection, SqlCommand and so
forth, you define your queries as strings in C# - no compile time
error checking possible, e.g. if you mistype a single character and
specify "SELECT Naame......." instead of "SELECT Name.....", you'll
only find out at runtime due to either a crash or no data being
returned.
With LINQ (to SQL), you get a type-safe, compile-time checkable
syntax, so if you happen to write
var q = from myTable
where .......
select new { Naame,. ......}
you'll immediately get the compiler barfing at you, since you mistyped
a field name.
And of course, with the type-checking also comes Intellisense - you'll
never get THAT when typing up your queries in a string inside a C#
method.....
Marc