开发者

Can EF Code First populate entities from a dataset?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜