Entity Framework Core Interceptors
12:18
Command Design Pattern in C#
12:36
Adapter Design Pattern in C#
9:42
Strategy Design Pattern In C#
11:46
Event Driven Architecture in  .NET
14:36
Пікірлер
@STEVESTACEL
@STEVESTACEL 2 күн бұрын
Do you have a video with FluentMail being used with Gmail
@CodeMaze
@CodeMaze 2 күн бұрын
No, I didn't want to include Gmail here because it is a bit harder to set it up with all the GMail restrictions and app passwords. But, as I said in the video, I have another one where I use MailKit library with Gmail, you can find it linked in the description.
@STEVESTACEL
@STEVESTACEL 2 күн бұрын
Thank you very much. You are awesome.
@CodeMaze
@CodeMaze 2 күн бұрын
I am glad the video was helpful. I am trying to help as much as I can. Thank you for the membership and watching the video.
@JustinFlint-u2t
@JustinFlint-u2t 4 күн бұрын
This helped tons. Thank you
@CodeMaze
@CodeMaze 4 күн бұрын
Glad to hear it! Thank you for watching the video.
@woudjee2
@woudjee2 4 күн бұрын
Thank you for the video. It was not exactly what I was looking for, but it helped me significantly in my search to what I need :D
@CodeMaze
@CodeMaze 4 күн бұрын
Hi. That's great to hear. I am sure I can't answer all the questions in a single video, but if it can help you or anyone else with their search and further learning, I am more than happy with it :)
@woudjee2
@woudjee2 4 күн бұрын
@@CodeMaze that is exactly what you did, thank you kindly!
@TheMostafa5000
@TheMostafa5000 4 күн бұрын
That was awesome, Thanks.
@CodeMaze
@CodeMaze 4 күн бұрын
You're welcome! Thank you for watching the video.
@asadnaeem123
@asadnaeem123 4 күн бұрын
no comparison of @CodeMaze👍
@TheMostafa5000
@TheMostafa5000 4 күн бұрын
That was very useful, Thanks.-
@CodeMaze
@CodeMaze 4 күн бұрын
Glad it was helpful!
@rvrunkillyow716
@rvrunkillyow716 9 күн бұрын
What are use cases in using exception locally and globally? Thanks in advance.
@CodeMaze
@CodeMaze 9 күн бұрын
I would always go with a centralized place to handle excpetions, without try-catch blocks in each action separately. Then, if you need some complex logic, you can customize your handler, extract classes with the logic, etc, but still, the base handling logic is in a single place. It reduces the code complexity in your actions and your business logic.
@Mastersenseinew
@Mastersenseinew 6 күн бұрын
What is wrong with try catch anyway i dont get it I think this structure way more complicated for me yes u defines as ones but you eventually sending each exception same type of objects and 500 for all of them not a good idea in my opinion. İnstead of this I created genericresponsebase class and define error,notfound,success etc methods inside of it and whenever program catches the exception I pass arguments into error func all details and finally when the request finish I return IAction functions such as ok,notfound,badrequest etc.
@Mastersenseinew
@Mastersenseinew 6 күн бұрын
And I want to understand something that what is differences between localy control and globally, is there any performance differences or just dry opinion clean arc behind of it
@CodeMaze
@CodeMaze 6 күн бұрын
Hi. First of all, there is nothing wrong with try catch blocks, just having them in every action or every method is not the cleanest approach. Now, regarding your comment about 500 error all the time, in one part of the video I state this: "One thing to mention here. We are using the 500 status code for all the responses from the exception middleware, and that is something we believe should be done. After all, we are handling exceptions and these exceptions should be marked with a 500 status code. But this doesn't have to be the case all the time. For example, if you have a service layer and you want to propagate responses from the service methods as custom exceptions and catch them inside the global exception handler, you may want to choose a more appropriate status code for the response. You can watch about this technique in the Onion Architecture video, which you can find in the description below." So, I have the Onion Architecture video where this technique is used to return different status codes to the client. Everything you see in the global exception handler can be customized and extracted into own classes, if needed, so for me, this is always a cleaner approach - the way I use in all my projects. Also, I don't think there are any performance advantages for this approach, at least, not that I have noticed, but reagarding the cleaner actions and cleaner service layer methods - that's for sure.
@Mastersenseinew
@Mastersenseinew 6 күн бұрын
​@@CodeMazethanks for the response great explanation
@mek_Morok
@mek_Morok 10 күн бұрын
How on earth do you have only 15k subscribers??? This video is one of the best tutorials i've seen!
@CodeMaze
@CodeMaze 10 күн бұрын
:), I need to try harder, I guess :) Thank you for watching the video. Glad it was helpful.
@hassanarafat6430
@hassanarafat6430 10 күн бұрын
Hey Marinko, nice video. One query reg using filter for handling of model binding exception handling. Would a modelbindingerror handling middleware be a better choice over a filter ? Because that would be centralized and means lesser code and also chances of someone missing to use it decreases.
@CodeMaze
@CodeMaze 10 күн бұрын
I always used filters. The logic inside them are reusable and all we have to do is to add the filter on top of action. I am not sure about middleware and how you can do that there. I would like to see an example of that one.
@mochellalle3524
@mochellalle3524 13 күн бұрын
Hello, I am new to .net and your channel, your channel was recommended to me to learn from scratch, can you give me your learning path from scratch from your channel? thank you.
@abhayashis
@abhayashis 13 күн бұрын
Awesome video 👍
@CodeMaze
@CodeMaze 13 күн бұрын
Thank you! Cheers!
@raleyph
@raleyph 15 күн бұрын
Thank you! First normal gude for Ocelot on YT))
@CodeMaze
@CodeMaze 15 күн бұрын
Glad the video was helpful! Thank you for watching it.
@Paul-cb4bc
@Paul-cb4bc 16 күн бұрын
Thank you so much for this very clear content. I confused this content a such long time until see your video. But one thing, please help me if you have free sometime. In the 1 request, we have 2 calls to database, but the second calls will need to the data from the first call to get data, So, we still need to use await keyword? because as my understanding, when the first call was excuted, it returns incomplete task and we do not have data yet. Thank you for your video
@CodeMaze
@CodeMaze 16 күн бұрын
Hi. Thanks a lot for the kind words and for watching the video. Yes, you have to use the await keyword because the second async call depends on the result of the first one. So, you have to wait the first one to be completed and return the required result.
@tanjuavsar4847
@tanjuavsar4847 18 күн бұрын
Hi thanks for useful information but I couldn't see where you set rabbitmq address ?
@CodeMaze
@CodeMaze 18 күн бұрын
Thank you for watching the video. I didn't set the address. MassTransit knows it by default via configuration.
@mohamedmatrab2888
@mohamedmatrab2888 19 күн бұрын
Very Useful Thanks
@CodeMaze
@CodeMaze 19 күн бұрын
You are welcome
@Paul-cb4bc
@Paul-cb4bc 19 күн бұрын
Thank you so much for your informative video. I had found on stackoverflow more 2 days until get your video. Just 1 concern, in the delegate - it seems that the type of key should be ProcessResolverKey Enum? Is it right?
@CodeMaze
@CodeMaze 19 күн бұрын
If you talk about the ProcessorResolver delegeate, it should be string as the value of the PrcessorResolverKeys class has all the constants of the string type.
@Paul-cb4bc
@Paul-cb4bc 19 күн бұрын
Thanks so much for your response, yeah, I did not see you show the content of ProcessorResolverKeys class, I thought that it is a Enum Then I use Enum type so the first approach can run successfull but for the AddKeyedTransient case, it fail because the key should be string. Again, really aprreciate your video
@anaselrantisi1777
@anaselrantisi1777 19 күн бұрын
I don't have GPU there is any solution ?
@CodeMaze
@CodeMaze 19 күн бұрын
Try using the same library version I used. These things change so fast - therefore they might have changed something.
@ManojRawat-lp4yc
@ManojRawat-lp4yc 19 күн бұрын
Why didn't you tried interface like IFormFile for uploading a file as use of stream can be done there as well ? Any particular reason for not choosing IFormFile ?
@CodeMaze
@CodeMaze 19 күн бұрын
No special reason, I just didn't need it here, and I can get the body from the request as shown in the video.
@dushanbaranige3799
@dushanbaranige3799 21 күн бұрын
how do we set up profile settings ( deployment mode and Target runtime) when we publish the Windows service on the IIS service?
@sunrise7442
@sunrise7442 23 күн бұрын
Nice content!
@CodeMaze
@CodeMaze 23 күн бұрын
Glad you think so! Thank you for watching.
@damjanvasovic9371
@damjanvasovic9371 23 күн бұрын
I saw your new course about microservices , how many hours does the course take ?
@CodeMaze
@CodeMaze 23 күн бұрын
Hi. It is an online text course. You can do it at your own pace. The platform allows a lot better reading and learning experience and that's why we decided to move from PDFs to online courses.
@shabanelmogy7912
@shabanelmogy7912 23 күн бұрын
I use HangfireAuthorizationFilter but dont work with me can you implement in another video
@CodeMaze
@CodeMaze 19 күн бұрын
I can't say for sure, but I'll have it in my mind.
@juliansegura5507
@juliansegura5507 23 күн бұрын
Loved the UI part. Is it possible to have different APIs on a single UI?
@CodeMaze
@CodeMaze 23 күн бұрын
To be honest, never tried that. It was usually one UI one API :)
@tarnkappencola1302
@tarnkappencola1302 25 күн бұрын
Interesting, as always. Many thanks!
@CodeMaze
@CodeMaze 24 күн бұрын
Glad you enjoyed it! Thank you for watching the video.
@CodeMaze
@CodeMaze 25 күн бұрын
Thank you all for watching and for your support. ►► If you want to check out all our courses you can do that here: bit.ly/cdmz-courses
@imtiazdahar8451
@imtiazdahar8451 26 күн бұрын
Thanks for video. I have an assignment that Roles must be dynamic, means that in [Authorize(Roles = "Admin")] must not be constant, it can vary and dynamic (could be changed on runtime rather than putting hardcoded). How can I get list of roles for the user who is accessing the controller/action to check wether he/she is allowed to access or not. How can I achieve this, can you guide me or make a video on this? I would be very thankful.
@CodeMaze
@CodeMaze 26 күн бұрын
Hi. For your use case, you have to use claims and policies. When you have a kind of complex authorization logic with roles, you can't do that simply using the fixed attribute values. The policies will allow you a lot of flexibility and a custom code. Even though my video: kzbin.info/www/bejne/oorZd2lpiNuGack doesn't cover your specific use case, maybe it can help you to get the global picture of how you can do it.
@TeemoPwnstar
@TeemoPwnstar 28 күн бұрын
I really dislike the repr pattern personally. Thank you for the video though - it was well presented (even for a subjectively 'bad' pattern :D)
@CodeMaze
@CodeMaze 28 күн бұрын
Well, it is kind a interesting for me, but currently, I don't think I would go this way unless asked for... but again, it is not something I will just throw away, it looks interesting enough. Thank you very much for watching the video and the comment.
@er.manojsingh7359
@er.manojsingh7359 29 күн бұрын
Thanks for add this in series and it will be really helpful. Thanks
@CodeMaze
@CodeMaze 28 күн бұрын
Glad it was helpful!
@k2an
@k2an 29 күн бұрын
I trhink i am the one hate clean arch. and like clean arch approaches. you arent make things ez maintainable just 1 entity you create alot of folder files bla bla . btw thanks for your time
@CodeMaze
@CodeMaze 29 күн бұрын
First, you are welcome and thank you for watching the video. Second, you are not the only one, trust me on that :) If you watched the video untill the end, you probably have seen me asking the same question. But I must admit, I like architectural approaches :)
@k2an
@k2an 29 күн бұрын
@@CodeMaze I like architectural approc. also but nowadays everyone starts projects with this like patterns. these all microservices fault :) after this everyone starts ms for their basic applications. again thanks for video
@CodeMaze
@CodeMaze 28 күн бұрын
Overengineering was always a problem in software development, I completely understand your point there :)
@lexNwimue
@lexNwimue 29 күн бұрын
Thanks for sharing. Simple and straight to the point
@CodeMaze
@CodeMaze 29 күн бұрын
You are very welcome.
@Paul-uo9sv
@Paul-uo9sv Ай бұрын
good stuff thanks
@CodeMaze
@CodeMaze Ай бұрын
You are very welcome. Thank you too for watching the video.
@Skwerzmernerpl
@Skwerzmernerpl Ай бұрын
REPR lends itself to vertical slice architecture very well; it makes more sense to have your request/response records defined in the same file as the endpoint they pertain to since they should be used anywhere else and they'll be immediately visible when working within the endpoint file.
@CodeMaze
@CodeMaze Ай бұрын
I really don't kike having multiple classes/records in the same file, especially when those records are DTOs. If for example you have a client Blazor apo consuming your API, I would even place them in a separate project and share that project with a Blazor client app in order to avoid double file creation both on the client and the server.
@sirnicolas21
@sirnicolas21 Ай бұрын
do you have the repo (without the model) somewhere? it just throws System.NullReferenceException: 'Object reference not set to an instance of an object.' This exception was originally thrown at this call stack: [External Code]"
@sirnicolas21
@sirnicolas21 Ай бұрын
hmmm 0.18v does this, 0.16 works
@CodeMaze
@CodeMaze Ай бұрын
Yeah, in the video I am using package 0.16 version. They probably changed something because all of this evolves so quickly.
@IZ908
@IZ908 Ай бұрын
It is not working for 2 gb files. HTTP Error 413.1 - Request Entity Too Large
@CodeMaze
@CodeMaze Ай бұрын
All the resources I found online regarding to this issue are referencing to the max allowed file size limit issue on the server you are using for hosting. So maybe those articles online can help.
@coding-in
@coding-in Ай бұрын
How in minimal Api?
@CodeMaze
@CodeMaze Ай бұрын
It is similar. The configuration should be the same just the usage is a bit different because you use chained methods on endpoints.
@coding-in
@coding-in Ай бұрын
@@CodeMaze yes similar but i dont know I've tried to my minimal api not working(show the comments every fields), i still looking for it..
@novaploca2080
@novaploca2080 Ай бұрын
Interesting, thanks for this. :)
@CodeMaze
@CodeMaze Ай бұрын
You are very welcome. Thank you too for watching the video.
@CodeMaze
@CodeMaze Ай бұрын
Thank you all for watching and for your support. ►► If you want to check out all our courses you can do that here: bit.ly/cdmz-courses
@OnePieceWonPeace
@OnePieceWonPeace Ай бұрын
The Strategy Pattern is great when you need to, say, change a custom table column sort based on some other settings. I tend to notice, however, that The Strategy Pattern oftentimes quickly becomes The State Pattern where, in the table example, ends up with the entirety of settings data and all the different methods for sorting the table data between different states across all of the columns. I think of The State Pattern just as The Strategy Pattern on steroids, or at least just more fleshed out over time. That said, many times all you need is just The Strategy Pattern.
@CodeMaze
@CodeMaze Ай бұрын
I fully agree. In software architecture so many times something that we initially meant to use as one pattern becomes something different when we are done with it. So, I would say it is the natural way of things and not in the bad way.
@mohamedfarazallah1854
@mohamedfarazallah1854 Ай бұрын
How to use in two different solutions like producer as different project in one solution and consumer as different project in another solution
@CodeMaze
@CodeMaze Ай бұрын
Hi. You can watch my Event-Driven Architecture video, maybe it can answer that question: kzbin.info/www/bejne/iWSscomfnp5lrtk
@feelil
@feelil Ай бұрын
So what is the benefit of this way ? Is it better for performance then expando and dynamic ?
@CodeMaze
@CodeMaze Ай бұрын
I really didn't test it against expando or dynamic. It was performant enough for my use cases.
@biradarsm
@biradarsm Ай бұрын
I just tried it, It worked like a charm. Super great video
@CodeMaze
@CodeMaze Ай бұрын
Great to hear! Thank you for watching the video.
@ManarAljarkas
@ManarAljarkas Ай бұрын
Great explanation!🔥
@CodeMaze
@CodeMaze Ай бұрын
Glad you think so! Thanks for watching the video.
@olamidejames7968
@olamidejames7968 Ай бұрын
what's the best way to run Prometheus in production, I have the opensource exe on a dedicated server but keeps shutting down after a period of time
@CodeMaze
@CodeMaze Ай бұрын
Hmmm... the best way... I can't tell, there are situations for different approaches for sure. I was talking to my team and we always ran it through Docker, generally in a Kubernetes cluster. That way it is resilient to restarts (handled by Kubernetes) and means we can have multiple instances should it be required.
@LeszekGlogow
@LeszekGlogow Ай бұрын
Nice tutorial thanks!
@CodeMaze
@CodeMaze Ай бұрын
You're welcome! Thanks for watching.
@AlanRutter-h2m
@AlanRutter-h2m Ай бұрын
I have followed your examples and have been trying to test the HTTPOnly cookie on my local development machine. When I perform the authentication, I get back both access token and refresh cookies which I can view in Chrome DevTools. When I call the refresh endpoint, the access token is not sent and it no longer appears in Chrome DevTools as a cookie. I've also tried using ThunderClient and rest-client inside VSCode - same thing. Now I'm stuck ..
@codeDotnet
@codeDotnet Ай бұрын
Thanks 🎉
@CodeMaze
@CodeMaze Ай бұрын
You're welcome 😊