In the previous chapter, we learned about the ADO.NET Entity Data Model (EDM), a conceptual model, that can be used to design the data access layer of your application. In this chapter, we will discuss how to map stored procedures in the EDM and use them in our applications. We will discuss the following points:
Mapping Stored Procedures to Functions in the EDM
Using Stored Procedures
Mapping Stored Procedures that return Custom Entity Types
Stored Procedures are represented as functions in the EDM. To use these functions, they should be mapped to a corresponding Insert, Update, or Delete operation on the entity. To do this, you need to first create a Function Import and then use the designer to create its mapping. In this section, we will learn how to create these Function Imports for our EDM.
To begin, let's refer to the Entity Data Model we created in chapter 2:
To create Function...