
Entity Framework Core in Action
SECOND EDITION
JON P SMITH
To comment go to liveBook

Manning
Shelter Island
For more information on this and other Manning titles go to
www.manning.com
The following table provides a list of topics covered in this book, with a list of chapters where that topic is covered, with the primary chapter at the front. It also lists any key figures that go with this topic.
Topics | Chapters | Key figures (chapter.figure) |
---|
Setting up EF Core | 1, 2, 7, 8, 5 | 1.4, 2.7, 1.5 |
Query the database | 2, 5, 6 | 2.7, 2.8, 6.2 |
Create, Update, Delete | 3, 5, 8, 11 | 3.1, 3.2, 6.8 to 10 |
How EF Core works inside | 1, 6 | 1.6, 1.8, 1.10, 6.8 to 6.10 |
Business Logic | 4, 5, 13 | 4.2, 4.4, 5.4 |
ASP.NET Core | 5, 2 | 5.1, 5.4 |
Dependency injection | 5, 14, 15 | 5.2, 5.3 |
Async/await | 5, 14 | 5.8, 5.9 |
Configure non-relational | | 7.1, 7.2 |
Configure relationships | | 8.1, 8.2, 8.3, 8.4 |
Configure table mappings | | 8.12, 8.13 |
Database migrations | 9, 5 | 9.2, 9.3, 9.5, 9.7, 9.8 |
Concurrency issues | 10, 15 | 10.3, 10.4, 10.5, 10.6, 10.7, 15.7 |
Using raw SQL | 11, 6 | 15.3 |
Domain-Driven design | 13, 4 | 13.3, 4.2, 13.4, 13.5 |
Performance tuning | 14, 15, 16 | 14.1, 15.2, 15.4, 15.9, 16.7, 16.8 |
Cosmos DB & other databases | 16, 17 | 16.1, 16.3, 16.4, 17.5 |
Data Validation | 4, 7, 10 |
Unit testing | | 17.2, 17.3 |
LINQ language | Appendix, 2 | A.2, A.1 |

An example of an Entity Framework Core database query
Copyright
For online information and ordering of these and other Manning books, please visit www.manning.com. The publisher offers discounts on these books when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com
2021 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in the book, and Manning Publications was aware of a trademark claim, the designations have been printed in initial caps or all caps.
Recognizing the importance of preserving what has been written, it is Mannings policy to have the books we publish printed on acid-free paper, and we exert our best efforts to that end. Recognizing also our responsibility to conserve the resources of our planet, Manning books are printed on paper that is at least 15 percent recycled and processed without the use of elemental chlorine.

| Manning Publications Co. 20 Baldwin Road Technical PO Box 761 Shelter Island, NY 11964 |
Development editor: | Marina Michaels |
Technical development editor: | Joel Kotarski |
Review editor: | Aleksandar Dragosavljevic |
Production editor: | Keri Hales |
Copy editor: | Keir Simpson |
Proofreader: | Melody Dolab |
Technical proofreader: | Julien Pohie |
Typesetter: | Dennis Dalinnik |
Cover designer: | Marija Tudor |
ISBN: 9781617298363
Praise for the first edition
This book helped highlight some issues my team was having with EF Core and has become an invaluable resource that takes pride of place on our bookshelves.
Evan Wallace, senior software Developer at Berkley Insurance Australia
The most complete go-to book for anything you need to know about EF Core! The #1 must-have EF Core reference for your library!
Mauro Quercioli, senior independent software architect/developer, Siena I.T. Consulting Corporation
Knowing that EF Core in Action is right there on my desk, I am approaching my latest assignmentto build out a new WebAPI application using Entity Framework Corewith complete confidence. The book addresses everything we needed to know about EF Core and more!
Phil Taffet, senior .NET developer, California Earthquake Authority
Finally a book to learn all about EF Core. Its fun and engaging reading this. Be carefulwhether youre a beginner or professional, youll learn something.
Raushan Kumar Jha, SE-2, Microsoft India (R&D)
This is a solid book dealing well with the topic in hand but also handling the wider concerns around using Entity Framework in real-world applications.
Sebastian Rogers, technical director, Simple Innovations
front matter
foreword
Have you ever worked on an application that doesnt use data and requires some means of interacting with a data store? In my decades as a software developer, every single application I have worked on or have helped others with has depended on reading and writing to some type of data store. When I became a solo entrepreneur in the 1990s, I came up with the name The Data Farm for my company. I am definitely a data nerd.
Over the past few decades, Microsoft has gone through many iterations of data access frameworks. If youve been working in this arena for a while, you might remember DAO and RDO, ADO, and ADO.NET. In 2006, Microsoft shared the first iterations of the as-yet-unnamed Entity Framework (EF), based on work done at Microsoft Research in a private meeting at TechEd. I was one of the few people invited to that meeting. It was my first time seeing an Object Relational Mapper (ORM), a library that focuses on relieving developers from the redundant drudgery of building connections and commands, writing SQL, transforming query results into objects, and transforming object changes into SQL to persist back to the database.
Many of us worried that this framework was yet another data access framework that Microsoft would give up on in short order, forcing us to learn yet another one down the road. But history has proved us wrong. Fifteen years later, Microsoft is still investing in Entity Framework, which has evolved into the cross-platform and open source Entity Framework Core and continues to be Microsofts go-to data access library for .NET developers.
Next page