mardi 3 mars 2015

Managing different Return Types when calling a Stored Procedure in Entity Framework


I am using Entity Framework to call some Stored Procedures to return results for various reports. I would like some of these SPs to return some additional columns under certain conditions based on the input parameters. The calling application will know what to expect based on these input parameters.


As I am using EF, I have to specify a specific Return Type (e.g. mysproc_Result) however I would like to present a different return type under certain conditions.


Is there a way to do this or am I going to have to resort to calling the SP at a lower level , passing in the correct Return Type?


NOTE: This question isn't about returning Multiple Result Sets. Thanks.





Aucun commentaire:

Enregistrer un commentaire