Mapping functions


So far all our entity properties are mapped directly to database fields, and the Entity Framework is generating the code to insert, update and delete values. But as you probably know, many database administrators don’t allow this kind of direct access. For very good reasons having to do with maintaining the integrity of the data for which they’re responsible, they require you to perform these operations through stored procedures. The Entity Framework treats stored procedures as functions. You add them using the Update Wizard and connect them to the conceptual model in the database file. Let’s give it a whirl:

The first step ...

Get Fluent Entity Framework now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.