views:

26

answers:

0

Hi,

I am using EF4 and I used the POCO entity generator to create my entities. I have a stored procedure called UpdateApplicationState. I pass it just 2 parameters called ApplicationID and ApplicationStateID. It returns nothing so I set the return type as None. I only want it to update the application state ID, nothing else. When I create my function import for this stored procedure then I don't see it in my context file under "Function Imports". Why is this? Is it then created on another place? How would I call this method?

EDIT:

Is there no one here that canhelp me here? All that I want to do is to call this import function (which is not in the context) like I do my other import functions in my repository class:

public void UpdateApplicationState(int applicationID, int applicationStateID) 
{ 
   context.UpdateApplicationState(applicationID, applicationStateID); 
}

And from my view:

applicationRepository.UpdateApplicationState(id, newApplicationStateID);

Here is my stored procedure:

ALTER PROCEDURE [dbo].[UpdateApplicationState] 
( 
   @ApplicationID INT, 
   @ApplicationStateID INT 
) 

AS 

BEGIN 

   UPDATE 
      [Application] 
   SET 
      ApplicationStateID = @ApplicationStateID 
   WHERE 
      ApplicationID = @ApplicationID; 

END

Thanks