Chapter 2. Understanding database queries
Course Content
0 / 164 completedChapter 1. What about NoSQL
Chapter 1. An overview of EF Core
Chapter 1. Some words for existing EF6.x developers
Chapter 1. Introduction to Entity Framework Core
Chapter 1. My “lightbulb moment” with Entity Framework
Part 1. Getting started
Chapter 1. The stages of development of EF Core
Chapter 1. Setting up the MyFirstEfCoreApp application
Chapter 1. The database that MyFirstEfCoreApp will access
Chapter 1. Your first EF Core application
Chapter 1. Should you use EF Core in your next project
Chapter 1. When should you not use EF Core
Chapter 1. Looking under the hood of EF Core
Chapter 1. Summary
Chapter 2. Creating the application’s DbContext
Chapter 2. Understanding database queries
Chapter 2. Querying the database
Chapter 2. Using client vs. server evaluation Adapting data at the last stage of a query
Chapter 2. Introducing the architecture of the Book App
Chapter 2. Adding sorting, filtering, and paging
Chapter 2. Putting it all together Combining Query Objects
Chapter 2. Building complex queries
Chapter 2. Summary
Chapter 2. Loading related data
Chapter 3. Changing the database content
Chapter 3. Creating new rows in a table
Chapter 3. Deleting entities
Chapter 3. Summary
Chapter 3. Updating database rows
Chapter 3. Handling relationships in updates
Chapter 4. Complex business logic example Processing an order for books
Chapter 4. Using EF Core in business logic
Chapter 4. Using a design pattern to implement complex business logic
Chapter 4. Simple business logic example ChangePriceOfferService
Chapter 4. Validation business logic example Adding review to a book, with checks
Chapter 4. Summary
Chapter 5. Using EF Core in ASP.NET Core web applications
Chapter 4. Implementing the business logic for processing an order
Chapter 5. Understanding the architecture of the Book App
Chapter 4. Adding extra features to your business logic handling
Chapter 5. Understanding dependency injection
Chapter 5. Making the application’s DbContext available via DI
Chapter 5. Calling your database access code from ASP.NET Core
Chapter 5. Implementing your database methods as a DI service
Chapter 5. Implementing the book list query page
Chapter 5. Deploying an ASP.NET Core application with a database
Chapter 5. Using asyncawait for better scalability
Chapter 5. Using EF Core’s migration feature to change the database’s structure
Chapter 5. Running parallel tasks How to provide the DbContext
Chapter 5. Summary
Chapter 6. Writing to the database with EF Core
Part 2. Entity Framework in depth
Chapter 6. Summary
Chapter 6. Tips and techniques for reading and writing with EF Core
Chapter 7. Configuring nonrelational properties
Chapter 7. A worked example of configuring EF Core
Chapter 7. Configuring by convention
Chapter 7. Configuring via Data Annotations
Chapter 7. Excluding properties and classes from the database
Chapter 7. Configuring via the Fluent API
Chapter 7. Setting database column type, size, and nullability
Chapter 7. Value conversions Changing data tofrom the database
Chapter 7. Adding indexes to database columns
Chapter 7. The different ways of configuring the primary key
Chapter 7. Configuring the naming on the database side
Chapter 7. Applying Fluent API commands based on the database provider type
Chapter 7. Configuring Global Query Filters
Chapter 7. Shadow properties Hiding column data inside EF Core
Chapter 7. Backing fields Controlling access to data in an entity class
Chapter 7. Summary
Chapter 7. Recommendations for using EF Core’s configuration
Chapter 8. Configuring relationships
Chapter 8. Configuring relationships
Chapter 8. What navigational properties do you need
Chapter 8. Configuring relationships By Convention
Chapter 8. Configuring relationships by using Data Annotations
Chapter 8. Fluent API relationship configuration commands
Chapter 8. Controlling updates to collection navigational properties
Chapter 8. Additional methods available in Fluent API relationships
Chapter 8. Summary
Chapter 8. Alternative ways of mapping entities to database tables
Chapter 9. Handling database migrations
Chapter 9. Understanding the complexities of changing your application’s database
Chapter 9. Part 1 Introducing the three approaches to creating a migration
Chapter 9. Editing an EF Core migration to handle complex situations
Chapter 9. Creating a migration by using EF Core’s add migration command
Chapter 9. Using SQL scripts to build migrations
Chapter 9. Using EF Core’s reverse-engineering tool
Chapter 9. Part 2 Applying your migrations to a database
Chapter 9. Migrating a database while the application is running
Chapter 9. Summary
Chapter 10. Configuring advanced features and handling concurrency conflicts
Chapter 10. Computed column A dynamically calculated column value
Chapter 10. Setting a default value for a database column
Chapter 10. Sequences Providing numbers in a strict order
Chapter 10. Marking database-generated properties
Chapter 10. Summary
Chapter 10. Handling simultaneous updates Concurrency conflicts
Chapter 11. Going deeper into the DbContext
Chapter 11. Understanding how EF Core tracks changes
Chapter 11. Using SQL commands in an EF Core application
Chapter 11. SaveChanges and its use of ChangeTracker.DetectChanges
Chapter 11. Looking at commands that change an entity’s State
Chapter 11. Dynamically changing the DbContext’s connection string
Chapter 11. Accessing information about the entity classes and database tables
Chapter 11. Handling database connection problems
Chapter 11. Summary
Part 3. Using Entity Framework Core in real-world applications
Chapter 12. Using entity events to solve business problems
Chapter 12. Where might you use events with EF Core
Chapter 12. Defining where domain events and integration events are useful
Chapter 12. Implementing a domain event system with EF Core
Chapter 12. Implementing an integration event system with EF Core
Chapter 12. Improving the domain event and integration event implementations
Chapter 12. Summary
Chapter 13. Domain-Driven Design and other architectural approaches
Chapter 13. The Book App’s evolving architecture
Chapter 13. Introduction to DDD at the entity class level
Chapter 13. The downside of DDD entities Too many access methods
Chapter 13. Altering the Book App entities to follow the DDD approach
Chapter 13. Using your DDD-styled entity classes in your application
Chapter 13. Three architectural approaches Did they work
Chapter 13. Getting around performance issues in DDD-styled entities
Chapter 13. Summary
Chapter 14. Part 2 Techniques for diagnosing a performance issue
Chapter 14. Part 3 Techniques for fixing performance issues
Chapter 14. EF Core performance tuning
Chapter 14. Using good patterns makes your application perform well
Chapter 14. Performance antipatterns Database queries
Chapter 14. Performance antipatterns Writes
Chapter 14. Summary
Chapter 14. Performance patterns Scalability of database accesses
Chapter 15. Master class on performance-tuning database queries
Chapter 15. LINQ+UDFs approach Adding some SQL to your LINQ code
Chapter 15. Good LINQ approach Using an EF Core Select query
Chapter 15. SQL+Dapper Creating your own SQL
Chapter 15. Improving database scalability
Chapter 15. Comparing the four performance approaches with development effort
Chapter 15. Summary
Chapter 15. LINQ+caching approach Precalculating costly query parts
Chapter 16. Cosmos DB, CQRS, and other database types
Chapter 16. Introduction to Cosmos DB and its EF Core provider
Chapter 16. Building a Command and Query Responsibility Segregation (CQRS) system using Cosmos DB
Chapter 16. The design of a two-database CQRS architecture application
Chapter 16. Understanding the structure and data of a Cosmos DB account
Chapter 16. Was using Cosmos DB worth the effort Yes!
Chapter 16. Differences in other database types
Chapter 16. Displaying books via Cosmos DB
Chapter 16. Summary
Chapter 17. Getting your application’s DbContext ready for unit testing
Chapter 17. Unit testing EF Core applications
Chapter 17. Three ways to simulate the database when testing EF Core applications
Chapter 17. Choosing between a production-type database and an SQLite in-memory database
Chapter 17. Using a production-type database in your unit tests
Chapter 17. Using an SQLite in-memory database for unit testing
Chapter 17. Stubbing or mocking an EF Core database
Chapter 17. Unit testing a Cosmos DB database
Chapter 17. Seeding a database with test data to test your code correctly
Chapter 17. Solving the problem of one database access breaking another stage of your test
Chapter 17. Capturing the database commands sent to a database
Chapter 17. Summary
Appendix. A brief introduction to LINQ
Appendix. Introduction to IQueryableT type, and why it’s useful
Appendix. Querying an EF Core database by using LINQ