Комментарии:
Just one question, does adding this transient service of pipeline behavior cause significant load w.r.t to performance or it more or less same? or to be simple does this overall process of validation impact performance of the microservice?
ОтветитьPlease read this ! Or pin this
In Validation Behavior.cs file
Change the
Var context = new ValidationContext(request) ❎❎❎❌
To
Var context = new ValidationContext<TRequest>(request). ✔️✔️✔️
And also remove the using validation context at line 8.
This is because fluent api change
Sir want to clear up some confusion, what is the diff. between IPostHandler and IPipelineBehavior? thank you.😊
ОтветитьHi Thank you very much for the video. I have two questions: which IDE are you using and I could not find a code on github. I'm not sure which repository to clone. Could you share it here, please? Thank you very much.
ОтветитьThank you Boss!
ОтветитьIsn't it a bit nit-picky to consider the performance impact of one throw-catch per request in the context of network communication?
ОтветитьThanks for the video.
How does multiple behaviours share data in MediatR?
so the validation in CreateCustomerOrderCommandValidator is called before you get into the ValidationBehaviour.Handle, in fact even before ValidationBehaviour is created, this is bit confusing, I would think that the validation is actually called on line 27 .Select(x => x.Validate(context)). What if there is no ValidateionBehaviour but there is still CreateCustomerOrderCommandValidator? Will MediatR execute validation in CreateCustomerOrderCommandValidator even if its not used anywhere?
ОтветитьSubscribed pal :)
Ответитьhow to adjust pipeline Behavior sequence. for ex. request-> Validate-> Cache-> Response and request->Cache->Validate->Response.
ОтветитьDo you have the code from this somewhere Nick? And can i have the link if u got it :)
ОтветитьOk, let say that I'm not going to use Exception Handler, what can be a real alternative in order to say something went wrong?
ОтветитьBy default mediatr.send method runs in synchronous way. How to configure it so that it works on asynchronous way?
ОтветитьBrilliant work, your videos are precious and clear. Like it!
ОтветитьIf you have a playlist, please add it you your video descriptions. It's always hard for me to find a playlist which video is in it
ОтветитьIs it just me or did I miss where you are translating that validation exception into a response? There is nothing in your controller to handle that exception! And no attribute on the action method either
ОтветитьAre these codes still available in github? I looked for it but couldn't find it. Really loved the videos.
Ответить👍🏽
ОтветитьThanks for the great video Nick. In the ValidationBehavior class, you mentioned that you were just throwing the new ValidationException(failures) exception for demonstration simplicity and that you would want to use an error handler pipeline rather than exception in production code. Can you point me to an example of the error handler pipeline?
ОтветитьAnd is it a good thing to let the raw request data to hit the action method? Every developer in the team should be aware of this behavior, otherwise one could think that the request data has already been validated.
ОтветитьHi Nick, do you have any video on testing the fluent validation? Would you just use some integration tests?
ОтветитьHow to do unit testing for this?
ОтветитьToo much abstraction. This will be difficult to debug as you can’t drill down from the mediatR to the final handler and need to manually search for the handlers. Sounds cool and is decoupled, but the over use of design patterns everywhere increases architectural complexity. In other words don’t over engineer because you found a new tool. Always have a good balance. You don’t need this for CQRS. Use straight DI. Also meditatR makes it difficult to inject fakes during unit testing.
ОтветитьI love these videos. I'm learning so much about modern patterns and practices after a long break from professional programming. Thank you! I tried to adapt the pattern in this video so as not to throw a validation exception (as you recommended yourself) but I found it to be very difficult and didn't find any good examples on the internet. Is there a pattern you recommend? Do you still believe it's important not to throw a costly ValidationException to signal an invalid command?
ОтветитьNo need to use a behaviour. A Preprocessor is more suitable for this.
ОтветитьWhere can I get the source code ? Could you please help me to find the source code?
Ответитьgood job
ОтветитьHi your videos are awesome , may I know the editor your using for the dotnet core
ОтветитьThumbs up for using Jetbrains Rider
ОтветитьThanks for the demostration, is a exelent form to initialize with MediatR and CQRS on create API services
ОтветитьGreat video Nick!
In a future video it would be really nice to see how to properly apply testing when using MediatR and the CQRS pattern.
Awesome video. Well-explained with perfect pace!
Ответитьhi, what do u think about using ActionFilter instead MediatR?
ОтветитьAs you mentioned Domain level validation; would you implement a validator for say "User does not exist" during a login process? If not, how would you implement this at the Handler level?
ОтветитьAwesome content. Thanks!
ОтветитьIt's a great video.Thanks a lot.
ОтветитьI couldn't able to find the source code on your website. Can you please provide. Thanks in advance.
ОтветитьGreat video but I can't access the source code either on github
ОтветитьNick, great video. I can't seem to view the source code though. I have subscribed, but still no dice. My git username is Cloudkill.
Ответитьcool and clean
ОтветитьFabulous Nick Just loved it a lot
ОтветитьGreat video but I can't access the source code either on github (I also subscribed to the mailing list)
ОтветитьGreat video. Thanks for the explanation. What tool do you use to draw on the screen like that?
ОтветитьHi, I love this, but not found this source on your GitHub. Is it?
Ответить