I have the ability to query a legacy system that returns a .NET DataSet.
Is there a way to use the Entity Framework Code First to populate my C# entities directly from a DataSet inst开发者_StackOverflow中文版ead of SQL Server?
You could of course copy the records yourself, but that would still leave the issues of tracking and updating.
So I would say No. Unless somebody develops an EF Provider (IQueryable) for Datasets. And that would be a lot of work, including running (E)SQL on datasets.
You could just instantiate the entities (manually, with Automapper, whatever) and then Attach
them to the DbSet.
精彩评论