Is LINQ to Dataset subset of LINQ to EF or these two are independent?
Linq works with the concept of queryProviders. The query provider is responsible for translating the lamba expressions into queries on the underlying data store. as Obalix said before me Linq to Entities query provider translates the linq with lambdas into real sql which is executed using underlying ado.net objects. Take a look at canonical functions here, which are translated into sql (and take notice which are not). On the other hand linq to dataset works against DAtaSet infrastructure. As you may remember Data Set has some queries associated with it. (getters, updates, deletes, inserts) with the usage of the DataAdapters objects. Linq queries are mapped onto objects that already exist in the dataset = tables, columns etc. The SQL queries are not built, because the provider does not operate at such a low level - the data set is the data abstraction it uses.
You might take a look at linq to SQL if Database agnosticism is not You concern, and there is even some provider linq to Oracle if I heard correctly.
They are independent.
Linq to Dataset works against a DataSet that was previously created using ADO.NET. The dataset is loaded prior to using linq, so the SQL queryies are not build dynamicly.
Linq to EntityFramework works against entity framework context. Here the SQL queries are constructed dynamically, based on the Linq query you provided.
They are independent and don't even work together very well.
LINQ-to-Datatsets is a set of extension methods that allows LINQ queries against data already loaded into DataTables, based on IEnumerable. It is close to querying List<> and other collections.
LINQ-to-Entities uses query providers and IQueryable to translate LINQ queries into SQL queries. It also provides for modeling of the database tables as objects.
If you use EF you are able to write (much more) Object Oriented, using DataSets remains Database Oriented.
来源:https://stackoverflow.com/questions/2438672/is-linq-to-dataset-subset-of-linq-to-ef-or-these-two-are-independent