I'm using the Entity Framework (EF) to create a complex type from a stored procedure. Recently, the stored procedure changed (more return values were added. I would like to update the complex type that maps to this stored procedure. Is this possible and if so, how? I am currently deleting my function import and complex type each time a stored procedure changes, which is most likely not the best approach.
I found another way of doing this without deleting the complex type. You can update your Complex Type and Visual Studio will add any changed columns. Here's how:
That should do it!
There is an easier way to achieve that, look here at SO. It adds some meta information to the stored procedure, which the EF uses to generate the appropriate return type for you.
The meta information part of the stored procedure is not executed, it just tells about which columns and datatypes it returns.