Entity Framework with 'Get' Stored Procedure that returns Entities
- by Nick Reeve
Hello,
I am attempting to execute a stored procedure that returns data with exactly the same columns as that of a table Entity I have in my project. I set the 'Returns a Collection Of' property in the 'Add Function Import' dialog to my entity type.
I get a NullReferenceException error when executing the stored procedure and on further digging it seems that it is because the 'EntityKey' property is missing. Is there anything I can do to tell it to ignore those special properties of the Entity?
I already have a partial class for that entity with '[ScaffoldColumn(false)]' but that doesn't seem to matter.
Cheers,
Nick