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.
精彩评论