LINQ Scenario
-
Using LINQ-to-DataSet is a lot easier than using GetChildRows, GetParentRow, GetParentRows ... methods (calling the relation using its name as string). LINQ-to-DataSet is just doing queries against the old, normal DataSet. LINQ gives you compile-time checking (strongly typed) instead of using SQL strings which the compiler doesn't check.* LINQ saves a lot of time and code (a simple LINQ query can save you for/foreach loops ...).* LINQ makes your code more readable and maintainable.* You can use the same LINQ query with different data sources (assuming they have the same member names or you'll have to do little modifications).* LINQ-to-SQL works only with SQL Server 2005 (and higher) while LINQ-to-Entities (Entity Framework) is more general and works with other databases as well. * Applies to LINQ in general.
Eslam Afifi