What is the fastest way to get the result of an Entity Framework query into a DataTable?

Viewed 441

I have reviewed many answers, However, I believe it should be easier than looping the results or rebinding and using SqlDataAdapters.

Performance is important in my case,

What is the fastest way to get the following query in a DataTable in C# Or VB.Net where econtext is a DbContext?

Dim r = (From AdCustomProperties In econtext.AdCustomProperties
         Where AdCustomProperties.AdID = AdID
         Select AdCustomProperties.PropertyTitle2, AdCustomProperties.PropertyValue2)
1 Answers
Related