I am using Entity Framework 4 with the POCO code generator. I have a stored procedure that does an INSERT and returns the @@IDENTITY of the inserted record. I am trying to import the stored procedure as a function in my .edmx file, but I am having trouble using it.
In the model browser, I can see the stored procedure under the database heirarchy, and then I right-click and select "Function Import..." I have tried using "None" as the return type as well as Int32 (even though it says "Collection of.."). The function appears under Function Imports, but even after saving and compiling, I am unable to find the function anywhere in my ObjectContext. I have attempted to delete it and re-import the stored procedure several times with no success.
NOTE: I have another stored procedure that does a straight SELECT and this is imported properly and shows up in the ObjectContext code.
Am I doing something wrong?