I am a new at MediatR user of .net core platform. And I read that is a nice solution to implement CQRS pattern. So my project does not use any database. And it dows only query from Elasticsearch. So Can I use MediatR in this project and is it make sense?
Asked
Active
Viewed 129 times
1 Answers
0
Actually when Database does not exists in solution it is not affected to MediatR and CQRS, because Database it is just a way to store you data (it can be simple List for example instead). MediatR with IRequest and IRequestHandler gives you another layer between view and domain. So answer is: yes you can use MediatR library/pattern in your solution.
Simple advice: NO complex logic in your controller methods. MediatR can help with this

IKomarovLeonid
- 352
- 1
- 9