开发者

Data bind IEnumerable<of anonymous type> with entity framework

开发者 https://www.devze.com 2022-12-21 17:08 出处:网络
I\'m binding thi开发者_开发技巧s Entity framework query to a gridview and is ultra slow. The delay is on databinding. Any solution?

I'm binding thi开发者_开发技巧s Entity framework query to a gridview and is ultra slow. The delay is on databinding. Any solution?

Using ctx As New DBEntities()

Dim PROC= (From p In context.Table.Include("RELATION") _ Where p.KEY= 1 _ Select p).First()

Dim q1 = From r In PROC.relation _ Select New With { _ r.key, _ r.field}

grdView.DataSource = q1 grdView.DataBind()

0

精彩评论

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