I tried calling ObjectContext.Translate<T>
where T is the abstract base type of a table-per-hierarchy entity. If the DbDataReader is streaming back all the columns of the underlying table, I thought this method would be able to construct the approprate subtype for it by reading the discriminator column, but instead it throws an exception saying it can't instantiate the abstract base type. If it was properly functioning, it would be trying to construct the derived discriminated type rather than the base type.
Is this a bug in the method, or is there some other way to read back table-per-hierarchy types from a data reader? I need to return table-per-hierarchy entities from a stored procedure (particularly one with multiple active result sets), and I can't seem to find an appropriate method that can translate the results while observing the data model mappings and table per hierarchy types.