I have imported a stored procedure that returns a dataset into my Entity Framework. This is .NET 3.5 Framework in VS2008.
Per Microsoft’s documentation, I have created a function import but the return types are:
None, Scalars and Entities. Obviously “None” isn’t an option for me since my procedure returns data. But Scalar and Entities aren’t options either because the data is in a set and it isn’t created based on an existing Entity prior to running the procedure.
I believe the option that best fits my scenario would be to select a Complex Datatype but that option isn’t available in VS2008. It looks as though VS2010 and/or .NET 4.0 Framework have the option available but I work in an environment where bumping up the framework for this simple piece of functionality isn’t going to be an immediate option.
Are there any other alternatives to Stored Procedure execution using the 3.5 entity framework? I am working in an MVC environment and preferrably don’t want to use data connection objects outside the scope of the existing structure as it deviates from the established standard.
What are my alternative options or is there a piece of the puzzle I’m missing here?
You could create a dummy view in the database that matches the desired return type and then import the View into your Entity Model and use it as the return type of the stored procedure.