I’m trying to use stored procedure in my Entity Framaework 4.
I have created entity model and can see the stored proc from the Model Browser in the Stored Procedure folder.
I added the stored proc through functional import. My stored proc has no return type. Now when I’m trying to call the stored proc in the object context (Business Layer ) I can’t see the stored proc in the intelisence. Is ther e any mistake I’m doing?
Note: I can see other procedures if they have return values . Here in this specilal case that do not have any return values
The POCO generating template for some reason ignores function imports that have no return type. I really don’t know why they did that, but you can fix it by changing the template. I remember that I did this too before I dropped the whole EF-POCO thing. Do you use POCOs with EF? To fix this you have to open the .tt template file. Basically I just copied the loop for the normal function imports and changed it a bit. What I added was
You can find a related q/a here: FunctionImport in entity framework 4 issue