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

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

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.
.NET 7  💥  - Intro to CQRS and MediatR with ASP.NET Core Web Api
1:06:48
Balloon Stepping Challenge: Barry Policeman Vs  Herobrine and His Friends
00:28
How to bring sweets anywhere 😋🍰🍫
00:32
TooTool
Рет қаралды 53 МЛН
Implementing In-Memory Caching in ASP.NET Core Applications
16:58
MediatR: Why should you use it?
7:20
CodeOpinion
Рет қаралды 53 М.
Lessons learnt from using Vertical Slice architecture - Steve Cross
11:52
Clean ASP.NET Core API using MediatR and CQRS | Setup
22:39
Nick Chapsas
Рет қаралды 318 М.
Mediator Design Pattern (C#)
11:24
Raw Coding
Рет қаралды 23 М.
Asynchronous Programming in .NET - How ASYNC and AWAIT Work
14:42
Implementing CQRS in ASP.NET Core Web API with MediatR
13:33
Tech With Pat
Рет қаралды 15 М.