Mapping functions

Image

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 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.