Victor Rodrigues
Victor Rodrigues

Reputation: 11721

Why isn't Entity Framework recognizing my procedure?

I am trying a function import, and EF doesn't recognize my procedure.

That's it:

ALTER PROCEDURE dbo.AddNewTicketFieldOption
    (
        @ticketFieldID INT,
        @optionID INT
    )
AS
BEGIN

INSERT INTO tbTicketFieldOptions
(cdTicketField, cdOption)
VALUES
(@ticketFieldID, @optionID)

--only to return something, EF hack
SELECT 0

END

Actually this procedure doesn't need a return. But I know EF requires it, so I've tried this scalar return (using RETURN 0 also), and selecting top 1 from an entity, using the select of an already recognized procedure.

When I try to update the model, it doesn't show up with this new procedure.

Is it something with the naming? I'm lost with it.

Upvotes: 0

Views: 80

Answers (1)

gbn
gbn

Reputation: 432471

What about permissions?

Upvotes: 1

Related Questions