开发者

Cast Bindingsoure.Current to POCO

I have a sqldatareader that gets assigned to a bindingsource and a datagridview datasource to that.

When I look at the type of Bindingsoure.Current its a DataRecordInternal. How can I cast that to my POCO?

Will I have to manually work out which fields in the Current object relate to my POCO. I could do it through my POCO and just tak开发者_运维技巧e the Grid.Cells[0]["ID"] and populate it that way but that is obviosuly another hit to the DB.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜