I have a stored procedure that I’ve mapped in my entity framework model (trying to do my first one), and I’ve specified a function import. The stored procedure returns a data set as the result, which is mapped to a complex type in my function import. I’m using VS.NET 2010.
I think that I’ve done all of the typical stuff required, i.e. like http://msdn.microsoft.com/en-us/library/bb896231.aspx. There are no model errors either.
Is there anything else that I need to do in order to be able to call my function import? Has anyone else had a similar issue where they’ve created a function import that returns a complex type, yet it didn’t show up as a callable function from the ObjectContext? If not, is there anything that you may recommend I look into in order to further investigate?
Edit:
I’m just executing my stored procedures directly with the entity framework direct execution method, http://msdn.microsoft.com/en-us/library/ee358758.aspx. The nice part is it still auto-maps to my complex types for me. Although I would love to use the function import approach…
Thanks
It will not show as method on
ObjectContextbut on derived generated class. If you are usingObjectContextdirectly you must call function import by usingExecuteFunction.