How can I return a datareader when using Entity Framework 4?

前端 未结 2 1151
情深已故
情深已故 2021-02-13 02:36

I want to define a database query using LINQ and my EntityFramework context but I don\'t want entities returned; I want a datareader!

How can I do this? This is for expo

2条回答
  •  鱼传尺愫
    2021-02-13 03:11

    This question is around EF 4, but for anyone else with EF 6 or higher you can use the AsStreaming() extension method.

    http://msdn.microsoft.com/en-us/library/dn237204(v=vs.113).aspx

提交回复
热议问题