views:

15

answers:

1

All,

I'm using mapped Stored Procedures in EF 1. I've completed the following steps:

  1. I've created my INSERT, UPDATE, and DELETE queries in SQL Server.
  2. I've built the EDMX and imported the INSERT, UPDATE, and DELETE sprocs as part of my model.
  3. I've set up a Stored Procedure Mapping on a table inside of my EDMX file. The INSERT, UPDATE, and DELETE sprocs were mapped accordingly.

Using this approach, I would expect to rebuild the application (and mine builds successfully) and then see the Stored Procedures as available function names via my EDMX object, such as:

_entities.InsertComment(..), 
_entities.UpdateComment(..), 
and 
_entities.DeleteComment(..)

Intellisense is not picking these names up and I can't figure out why.

If I perform these same steps using EF4, the function names are automatically picked up by Intellisense after adding the Stored Procedure Mappings.

Is this a bug in EF1? Is there something else I should be doing?

Thanks in advance,

Mike

+1  A: 

In EF 1 You have to map your "Function Imports" to a specified return type.

1) Create an Entity in the EDMX that has properties that match the return signature of the Stored Procedure

2) Set the return type of the imported SP in the Model Browser

Tr1stan