4 Using EF Core in business logic

This chapter covers

  • Understanding business logic and its use of EF Core
  • Using a pattern for building business logic
  • Working through a business logic example
  • Adding validation of data before it’s written to the database
  • Using transactions to daisy-chain code sequences

Real-world applications are built to supply a set of services, ranging from holding a simple list of things on your computer to managing a nuclear reactor. Every real-world problem has a set of rules, often referred to as business rules, or by the more generic name domain rules (this book uses business rules).

The code you write to implement a business rule is known as business logic or domain logic. Because business rules can be complex, ...

Get Entity Framework Core in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.