I am using the latest beta of Visual Studio 2010 and the Entity Framework. It's mostly really neat, but here's my situation:
- I have a table T with columns
Id
andName
. - I have an auto-generated entity with
Id
andName
properties. - Finally, I have a stored procedure that selects only
Id
from T.
Trying to map my entity to the stored procedure results in an EntityCommandExecutionException
:
A member of [the entity], 'Name', does not have a corresponding column in the data reader with the same name.
That makes sense, but is there some way to partially populate my entity from the stored procedure call and then fully materialize it later with a second query?
Nine months ago, the answer to this question appeared to involve a great deal of manual labor. In my case, we have hundreds of stored procedures, and literally none of them return full rows. The Entity Framework has come a long way since then, so I am hoping something might've changed.
Thank you in advance for any help!