Mapping Stored Procedures

The Entity Framework 4 makes importing stored procedures into the object model easier, as opposed to the first version of the technology that required a manual operation on the model files. In this section you learn to add stored procedure mappings to the entity data model. To accomplish this, first open the Visual Studio designer by double-clicking the Northwind.edmx file in Solution Explorer. When ready, right-click the designer and select the Update Model from Database command. This launches again the wizard that allows selecting database objects not included yet in the entity data model. At this point expand the Stored Procedures item and select the Ten Most Expensive Products stored procedure, as shown in Figure ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.