开发者

Querying Entity Data Model from C# code

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 D开发者_StackOverflowata Model sproc via code?

Thanks!


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"


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜