I have a complex stored procedure that returns contractvalue and invoicevalue. When I generated edmx, the stored procedure return value is mapped to int. I don't have a class defined, which takes contractvalue and invoicevalue. How can I get the sp executed using entity framework (6.1)
By the way I am not interested to change the generated entities because I will be updating the Db and refreshing the edmx at times. So I don't want to create mess. Instead I can use partial classes to extend any entity if needed, which can be placed outside of the generated files, so I wont miss custom changes on refresh.
You have to create an object that will hold the result of the stored procedure. I believe it is called a scalar object. If you open the "mapping details" toolbox you will see such objects. After you have created the object you will have to create a function import on your stored procedure and map the result of the function to your newly created object. At least that's how you do it in EF 5.