DataContext/Entity Model always read data from Database. is there any way DataContext/Entity Model will read the data from DataSet.
Thanks
DataContext/Entity Model always read data from Database. is there any way DataContext/Entity Model will read the data from DataSet.
Thanks
Johannes Rudolph
On
There is no automated way to make LinqToSql or the EntityFramework read data from a DataSet instead of from a Database. Using a DataSet as some kind of "disconnected database" is fine for a single UnitOfWork, if you want to use it as some kind of datastore in disconnected scenarios you should consider another solution such as SQL Server CE (which you can't use with L2S but with EF).
If your scenario resembles the first one (single Unit of Work) you need to fill the data manually into the dataset and can then use Linq-To-DataSet consecutively.
Copyright © 2021 Jogjafile Inc.
Check out Linq-to-DataSet