CQRS And MediatR in ASP.NET Core - Integration and Queries

  Рет қаралды 4,317

Code Maze

Code Maze

Күн бұрын

►► Master Web API development Best Practices: bit.ly/3TnqoFQ
►► Build great web apps in Blazor WebAssembly: bit.ly/437g87T
►► Support us on Patreon and get the source code: / codemaze
In this video, we are going to provide a brief introduction to the CQRS pattern, and how the .NET library MediatR helps us build software with this architecture.
0:00 Introduction
1:07 About CQRS and MediatR
4:08 MediatR Integration
11:09 Queries with MediatR
FOLLOW US ON SOCIAL MEDIA!
►► / marinko-spasojevic
►► / codemazeblog
►► / codemazeblog
VIDEO SUMMARY:
In this video, we will briefly introduce the CQRS pattern and how the .NET library MediatR helps us build software with this architecture.
Here, we will talk about how to integrate CQRS and MediatR with the ASP.NET project and also how to use Queries. In the next video, we will cover the rest of the topics - Commands, Behaviors, and Notifications.
The MediatR library was built to facilitate two primary software architecture patterns: CQRS and the Mediator pattern. While similar, let’s spend a moment understanding the principles behind each pattern.
CQRS stands for “Command Query Responsibility Segregation”. As the acronym suggests, it’s all about splitting the responsibility of commands and queries into different models.
If we think about the commonly used Create-Read-Update-Delete pattern, usually we have the user interface interacting with a datastore responsible for all four operations. CQRS would instead have us split these operations into two models, one for the queries - read operations, and another for the commands - create update and delete operations.
The CQRS pattern makes no formal requirements of how this separation occurs. It could be as simple as a separate class in the same application, all the way up to separate physical applications on different servers. That decision would be based on factors such as scaling requirements and infrastructure, so we won’t go into that decision path today.
The key point is that to create a CQRS system, we just need to split the reads from the writes.

Пікірлер: 9
@CodeMaze
@CodeMaze 5 ай бұрын
Thank you all for watching and for your support. ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33
@Fred_Edx
@Fred_Edx 5 ай бұрын
As simple as possible. Thank you Code Maze.
@CodeMaze
@CodeMaze 5 ай бұрын
You are most welcome Fred_Edx. Tomorrow, the second part will be published.
@KREKER8331
@KREKER8331 5 ай бұрын
As always ,great video! Thank you!
@CodeMaze
@CodeMaze 5 ай бұрын
You are most welcome. Thanks for the comment. Since there were changes with the library, we decided to record a new video with all the updates and split it a bit to make it easier to follow.
@talkathiriify
@talkathiriify 5 ай бұрын
Thank you very much for this very simple and rich video
@CodeMaze
@CodeMaze 5 ай бұрын
You are most welcome. Tommor comes the second part, so please subscribe and hit that bell button to get notification about our new videos (if you didn't already do that). Thanks for watching.
@MRYHTHEJEW
@MRYHTHEJEW 5 ай бұрын
well understood. Thank you.
@CodeMaze
@CodeMaze 5 ай бұрын
Glad it was helpful! Thanks a lot for the comment.
Implementing In-Memory Caching in ASP.NET Core Applications
16:58
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 21 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 1,2 МЛН
MediatR: Why should you use it?
7:20
CodeOpinion
Рет қаралды 53 М.
A Simple Kafka and Python Walkthrough
11:34
Quix
Рет қаралды 6 М.
How to Implement API Versioning for Minimal APIs | ASP.NET Core 8
18:11
Milan Jovanović
Рет қаралды 11 М.
CQRS Explained in 5 MINUTES | What is CQRS?
5:26
Marco Lenzo
Рет қаралды 30 М.
Mediator Design Pattern (C#)
11:24
Raw Coding
Рет қаралды 23 М.
Asynchronous Programming in .NET - How ASYNC and AWAIT Work
14:42
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 21 МЛН