开发者

Data bind IEnumerable<of anonymous type> with entity framework

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜