O'Reilly logo

Entity Framework Core Cookbook - Second Edition by Ricardo Peres

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inserting, updating, and deleting entities with stored procedures

What if we do not want to rely on the EF automatically generated SQL to retrieve, create, update, or delete our entities? This can be because we have specific needs, such as logging whatever changes we make, or checking for the right permissions. In this case, the best alternative is to provide our own SQL, particularly if we want to use stored procedures for that purpose. The previous versions of Entity Framework allowed us to do that very easily; however, version 1.0 of Entity Framework Core doesn't (yet) include this capability. Let's see how we can get over it.

Getting ready

We will be using NuGet Package Manager to install the Entity Framework Core 1 package, Microsoft.EntityFrameworkCore ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required