1

I am using Entity Framework extras EF6 in Visual Studio 2013 for calling a stored procedure that takes table valued parameter.

But on this line of code:

context.Database.ExecuteStoredProcedure(procedure);

I get this error:

'System.Data.Entity.Database' does not contain a definition for 'ExecuteStoredProcedure' and no extension method 'ExecuteStoredProcedure' accepting a first argument of type 'System.Data.Entity.Database' could be found (are you missing a using directive or an assembly reference?)

1 Answer 1

0

The error is pretty clear that tells you, there is no method definition like ExecuteStoredProcedure. You could execute the stored procedure using SqlQuery;

context.Database.SqlQuery<YourEntityClass>("procedureName",params);
Sign up to request clarification or add additional context in comments.

2 Comments

I want to pass table as parameter. And as i mentioned i am using entity framework extras EF 6. It is package available in nuget.
What is that "entity framework extras" package. I couldn't see any mentioned package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.