Want to master Clean Architecture? Go here: bit.ly/3PupkOJ Want to unlock Modular Monoliths? Go here: bit.ly/3SXlzSt
@user-gn7bd6mq8n
6 ай бұрын
You make coding life easier every day. ❤ Could you please make videos on ConfigureAwait(false) and a full video on Transaction Pipeline behaviour?
@MilanJovanovicTech
6 ай бұрын
Here's the full video: kzitem.info/news/bejne/1Il_zWecqZidfGU
@bennybloch
Ай бұрын
Thanks Milan for (another) great video! I just wonder if a command class implementing the interface: public interface ITransactionalCommand : ICommand, ITransactionalCommand { } will not cause a compilation error when used like this: var result = Mediator.Send(command) because it tries to assign "void" to a variable. It requires an explicit cast of the command instance to: ICommand which is not very convenient. Thanks again!
@MilanJovanovicTech
Ай бұрын
Works fine when I tried it. Did you try it from the code? It has to implement IRequest from MediatR
@jarnohonkanen4321
6 ай бұрын
Funny.. I was just playing around pipeline behaviors and implemented similar approach for transaction handling. This video would saved a lot of time to get basics right 😂 But i usually do things a hard way 😅
@MilanJovanovicTech
6 ай бұрын
The hard way is better long term, your learn more 😅
@julien184
6 ай бұрын
The pipeline for setting up transactions is really a gamechanger for me. The implemenation is so easy. Still we do save data in een external CMS. What makes it harder to do transactions overall.
@MilanJovanovicTech
6 ай бұрын
Yep, as soon as another service comes it transnationality goes out the window
@user-yc6mv1bj3b
6 ай бұрын
Great video
@MilanJovanovicTech
6 ай бұрын
Thanks!
@miguelamorese8697
6 ай бұрын
It's great!! Could you tell us where we get the Result type to implement in the Behavior ?
@MilanJovanovicTech
6 ай бұрын
This should help: gist.github.com/m-jovanovic/aa25b1ae424c985ff8ae696a79b6fe6e
@Laggie74
Ай бұрын
For some reason, the pipeline does not get hit when I specify the generic constraint "where TResponse : Result" Even though when I debug wihtout that constraint, it shows that the TResponse is of that type. 😵 I'm resorting to using reflection on the type after the call gets hit and bypass when it's not of that type. So weird.
@MilanJovanovicTech
Ай бұрын
Should work on latest version of MediatR
@tasin5541
6 ай бұрын
Would be great if you could add links to some git repos in the description. Easier to follow through with the videos.
@MilanJovanovicTech
6 ай бұрын
I share the code on Patreon
@Kylefuller002
6 ай бұрын
How would you handle TransactionalPipelineBehavior and IUnitOfWork with multiple DbContexts?
@MilanJovanovicTech
6 ай бұрын
You shouldn't do that, since you can't guarantee they'll be using the same DB under the hood. EF discourages this. That being said, you can share the same DB transaction between multiple DbContexts, so that's how you could implement it.
@user-gn7bd6mq8n
6 ай бұрын
In caching pipeline behaviour, when hit cache method GetAsync() it generates an error of deserialization from string because in Result class there is no default constructor and there are multiple constructor but which constructor i want to use for deserialization is not declared. should I change Result class by adding default constructor? but in result i did not see any default constructor. what to do?
Could you please make a video about bulk images upload without memory leakage and save image path
@MilanJovanovicTech
6 ай бұрын
Where are you uploading to?
@mpyoonuskunhava1340
6 ай бұрын
@@MilanJovanovicTech azure blob storage.
@arteqppp6223
6 ай бұрын
No words on IRequestPreProcessor/IRequestPostProcessor, are they kinda useless nowadays, and we should always use just IPipelineBehavior?
@MilanJovanovicTech
6 ай бұрын
You can do more with a pipeline behavior, IMO
@mesutdonmez586
6 ай бұрын
First like 🎉
@MilanJovanovicTech
6 ай бұрын
Congrats 🏆
@semen083
5 ай бұрын
Hi, what in your opinion more convient for exception with Mediatr- ExceptionPipelineBehaviour or global IRequestExceptionHandler?
@MilanJovanovicTech
5 ай бұрын
Same thing, but pic one. Middleware/exception handler can return an HTTP response.
@semen083
5 ай бұрын
@@MilanJovanovicTech can you give a advice pls. IRequestExceptionHandler don't called, if i locate it in another library. No any exception, just skipped the my Global IRequestExceptionHandler
@semen083
5 ай бұрын
@@MilanJovanovicTech I place my Global IRequestExceptionHandler in different library project and unfortunately it is not called. When i locate it in same project it is work as expected. It is normal behaviour or not? etc ExceptionPipelineBehaviour in other project called as expected
Пікірлер: 37