我已经查看了很多答案,但我认为应该比循环结果或重新绑定和使用SqlDataAdapters更容易。
在我的情况下,性能很重要,
如何以C#或VB.Net中econtext是DbContext的最快方式获取以下查询结果的DataTable?
在我的情况下,性能很重要,
如何以C#或VB.Net中econtext是DbContext的最快方式获取以下查询结果的DataTable?
Dim r = (From AdCustomProperties In econtext.AdCustomProperties
Where AdCustomProperties.AdID = AdID
Select AdCustomProperties.PropertyTitle2, AdCustomProperties.PropertyValue2)