1

I have an application with an Entity Data Model. I do not completely understand the value of an Entity Data Model. Either way, I know that it connects to my database and interacts with it. I have some C# code from which I want to execute a stored procedure. My problem is, I'm not sure how to do this using the "Entity Data Model" approach.

I'm familiar with the System.Data.SqlClient namespace, but that approach does not seem applicable here. Can someone tell me how to interact with an Entity Data Model sproc via code?

Thanks!

2 Answers 2

1

Here's a great video tutorial on "Practical Entity Framework for C#"

You can call a stored procedure on SQL Server like this:

myEntities.CalculateCustomerInvoices();

Here's an article on "Using Stored Procedures for Insert, Update & Delete in an Entity Data Model"

Sign up to request clarification or add additional context in comments.

Comments

1

This MSDN page explains how to work with stored procedures with the entity framework: http://msdn.microsoft.com/en-us/library/bb896279.aspx.

Comments

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.