From the course: Practical Application Architecture with Entity Framework Core

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Command query

Command query

- [Instructor] Command Query Responsibility Segregation is the logical separation of reading and writing information to a system. In the case of Entity Framework, it usually means there are read models and write models. In some situations, there are enough differences in the models to choose to make this separation in whole or in part. This architecture is about ensuring a separate path for the code that changes the system. In a last video, the create order view model represented both read and write sides of creating an order. With CQRS, these would be separated into two separate view models. Some people learn this method and really grab onto it, espousing it as the only way to write data-driven applications but it can mean writing a lot of extra code and having a lot of duplicate properties on models that represent the same information. Indicators that CQRS might be good for your situation are an event-driven architecture, significant differences in how data is read or how it is…

Contents