I have set up HasColumnName mappings on several properties using the fluent interface. These appear to work properly when using the collection properties on the data context to query and retrieve data.
However, I have a few instances where I use a stored procedure to return multiple result sets, then convert these results into entities using the ObjectContext.Translate method. In these cases I get an exception, "The data reader is incompatible with the specified '<class>'. A member of the type, '<typename>', does not have a correspending column in the data reader with the same name."
I suspect that the column name mapping specified in the fluent interface isn't being applied properly in the call to Translate.
However, I have a few instances where I use a stored procedure to return multiple result sets, then convert these results into entities using the ObjectContext.Translate method. In these cases I get an exception, "The data reader is incompatible with the specified '<class>'. A member of the type, '<typename>', does not have a correspending column in the data reader with the same name."
I suspect that the column name mapping specified in the fluent interface isn't being applied properly in the call to Translate.