© Adam Freeman 2018
Adam FreemanPro Entity Framework Core 2 for ASP.NET Core MVChttps://doi.org/10.1007/978-1-4842-3435-8_24

24. Using Transactions

Adam Freeman1 
(1)
London, UK
 

In this chapter, I describe the way that Entity Framework Core supports transactions, which are used to ensure that multiple operations are performed as a single unit of work. If all of the operations can be performed without problems, then the changes are applied to the database, which is known as committing the transaction. If one or more operation will fail, then the database is not modified, and the changes are abandoned, which is known as rolling back the transaction. (I am simplifying a little here because transactions can be complicated, but this the essence of how ...

Get Pro Entity Framework Core 2 for ASP.NET Core MVC 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.