I need to reuse a DataAccess method prescribed by client. This method returns a vanilla datatable. I want to cast this datatable to my Typed datatable. The amount of columns and their types will match. The exception message "Unable to cast object of type 'System.Data.DataTable' to type 'MarketValueDataTable'." is very clear, but how do I fix it?
Had a look at casting-a-base-type-to-a-derived-type, but could not see how to make that work.
I cannot populate the datatable with a datareader, can only use the client's DataAccess method.