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
Пікірлер
@kunjiMinnu
@kunjiMinnu 2 күн бұрын
Can we call web api in windows service
@CodeMaze
@CodeMaze 2 күн бұрын
Yes, of course. Just use HttpClient as you would in any other consumer app.
@Saleh_Mohammd
@Saleh_Mohammd 3 күн бұрын
Very informative, thx
@CodeMaze
@CodeMaze 2 күн бұрын
You are welcome, I am glad you found the video helpful.
@prasadgopi831
@prasadgopi831 6 күн бұрын
Good one.
@CodeMaze
@CodeMaze 6 күн бұрын
Thanks, glad you liked it!
@kakhatezelashvili3368
@kakhatezelashvili3368 9 күн бұрын
Thanks for an excellent video. In your examples you have used so-called "simple factory" and "abstract factory" approaches together with DI container, but is there any place for the third form of this pattern, "factory method" somewhere in API applications ? Thanks in advance.
@CodeMaze
@CodeMaze 8 күн бұрын
You are very welcome, and thank you for watching the video. Regarding your question, to be 100% honest, for me, Factory pattern is a pattern that strongly depends on abstraction, whether it is one version or another. The way you see it in the video is something I've used in my projects earlier, but I am pretty sure Factory Method could be implemented as well, just I would need to sit down and go through the solution again. After all both patterns are quite similar so I see no reason why you couldn't use the Factory Method instead.
@kakhatezelashvili3368
@kakhatezelashvili3368 7 күн бұрын
@@CodeMaze thanks for your answer again, amazing work ;)
@santoshkumaryadav4436
@santoshkumaryadav4436 11 күн бұрын
nice and clear, great effort !!
@CodeMaze
@CodeMaze 9 күн бұрын
I appreciate the kind words! Thank you too for watching the video.
@luizgagliardi6614
@luizgagliardi6614 13 күн бұрын
Great video! When using the typed HttpClient, you did not use the HttpClientFactory. In that case, what's the point of injecting the HttpClientFactory?
@CodeMaze
@CodeMaze 12 күн бұрын
Thank you. I believe you think about the HttpClientFactoryService class. The HttpClientFactory just happened to be already registered there, and I used the same class to show how we can use the typed client.
@Nims99
@Nims99 14 күн бұрын
Thanks!!! ❤
@CodeMaze
@CodeMaze 13 күн бұрын
You are very welcome. Thank you too for watching the video.
@Nims99
@Nims99 13 күн бұрын
@@CodeMaze ❤
@MaheshKumar-bg5re
@MaheshKumar-bg5re 14 күн бұрын
If I consume this api from browser and a mobile app, Will it work on mobile app? What is the procedure to secure an JWT token in mobile app? Do I need an additional flag to check if it is from mobile or browser? If browser, add JWT to cookie, if mobile, just send it as a string? Please clarify.. Thanks for the great video and sharing your knowledge.
@CodeMaze
@CodeMaze 14 күн бұрын
Hi. I am not a mobile developer, and didn't work with mobile apps, so I am not sure how tokens are stored there. Again, because I didn't work with mobile app development, I can't say for sure how things are working there. You can definitelly consume the API with your mobile app, just I can't tell you how tokens are handled there.
@Decoretum
@Decoretum 14 күн бұрын
Good day! I appreciate you for making this video! What is ProcessorResolverKeys? Is it an enum or a class? What is its structure?
@CodeMaze
@CodeMaze 14 күн бұрын
Hi. Thank you for watching the video. It is a class with some constants.
@MaheshKumar-bg5re
@MaheshKumar-bg5re 17 күн бұрын
Hi Does identity package have bearer token implementation by itself? Is it different from Jwt? In some videos, there is a refresh token. What are all these? Can you share any of your article to understand this?
@CodeMaze
@CodeMaze 17 күн бұрын
Fron .NET 8, Microsoft integrated Identity support, and there they provided all the endpoints for the authentication, refresh etc. For me, it is not ready yet for the full production usage because it is not that much customisable. Therefore, for me, using my own implementation is still way to go.
@MaheshKumar-bg5re
@MaheshKumar-bg5re 18 күн бұрын
Do you have udemy courses? By the way, wonderful video
@CodeMaze
@CodeMaze 18 күн бұрын
Thank you for the kind words and for watching the video. No, all the courses are on our courses page. You can find the link in the description.
@MaheshKumar-bg5re
@MaheshKumar-bg5re 18 күн бұрын
Hi, What is the difference with AddIdentity and AddIdentityCore? Is it okay to use AddIdentityCore?
@CodeMaze
@CodeMaze 18 күн бұрын
Hi. AddIdentity registered a few more services than AddIdentityCore. If you don't need Role services or SignInManager services, you can use the Core version.
@shahidwani6445
@shahidwani6445 19 күн бұрын
What if hacker gets both tokens
@CodeMaze
@CodeMaze 18 күн бұрын
There is nothing much to say there - you have a serious security issue then. This simply shouldn't happen. But if you have a client app, and you store your tokens in some sort of storage, you can encrypt them in the client app first and then store them. That way, if someone steals them, the tokens will be of no value to them. Of course, you have to remember to decrypt them before using them in the request.
@deepakkataria3500
@deepakkataria3500 21 күн бұрын
Really very help full and Informative video. Great Job.👍
@CodeMaze
@CodeMaze 21 күн бұрын
Thank you! I am glad you found the video helpful.
@joejoe2452
@joejoe2452 24 күн бұрын
So it only works with some what if users have different emails like Gmail, yahoo, hotmail can email still be send to everyone successfully
@CodeMaze
@CodeMaze 24 күн бұрын
You can send an email to any provider. Once you prepared your server to send your emails from, you can use the app to send those emails to any email address.
@joejoe2452
@joejoe2452 24 күн бұрын
@@CodeMazewill it work just by following everything in the video or need additional configuration need not shown on video also what happens from @4:44 to @4:55 it change from namespace .Services to .Model why?
@CodeMaze
@CodeMaze 24 күн бұрын
No, you don't need any additional configuration. You only need to setup your server that you will use to send your emails from. Other than that, everything is in the video. Here I didn't setup Gmail as the server because it would require a lot more configuration but I linked the video where I use Gmail to send emails so you can watch that one. Regarding the second question - namespace is not changed, just the using directive was added because I am using an object from different namespace.
@navyanavilu2639
@navyanavilu2639 27 күн бұрын
The video was very helpful!!! Thank you so much.
@CodeMaze
@CodeMaze 26 күн бұрын
Glad it was helpful! Thank you too for watching it.
@kongchu3598
@kongchu3598 28 күн бұрын
Thank you very much
@CodeMaze
@CodeMaze 27 күн бұрын
You are welcome. Thank you for watching.
@onlineaccounts-l1q
@onlineaccounts-l1q 29 күн бұрын
Great content, thanks for creating and sharing. 💯❤
@CodeMaze
@CodeMaze 29 күн бұрын
My pleasure! Thank you for watching the video.
@murr_ka4374
@murr_ka4374 Ай бұрын
Bro, RabbitMQ.Client 7.0.0 supports only CreateConnectionAsync(). Can you give me a hint how to realize it in singleton and register it in services?
@adedoyin-emmanuel-adeniyi
@adedoyin-emmanuel-adeniyi Ай бұрын
Thank you very much, brother. I got everything right except for the hierarchy issue :)
@CodeMaze
@CodeMaze Ай бұрын
I am glad the video helped you. Yeah, this has to be configured in a certain place in the middleware's hierarchy.
@STEVESTACEL
@STEVESTACEL Ай бұрын
Do you have a video with FluentMail being used with Gmail
@CodeMaze
@CodeMaze Ай бұрын
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 Ай бұрын
Thank you very much. You are awesome.
@CodeMaze
@CodeMaze Ай бұрын
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 Ай бұрын
This helped tons. Thank you
@CodeMaze
@CodeMaze Ай бұрын
Glad to hear it! Thank you for watching the video.
@woudjee2
@woudjee2 Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@CodeMaze that is exactly what you did, thank you kindly!
@TheMostafa5000
@TheMostafa5000 Ай бұрын
That was awesome, Thanks.
@CodeMaze
@CodeMaze Ай бұрын
You're welcome! Thank you for watching the video.
@asadnaeem123
@asadnaeem123 Ай бұрын
no comparison of @CodeMaze👍
@TheMostafa5000
@TheMostafa5000 Ай бұрын
That was very useful, Thanks.-
@CodeMaze
@CodeMaze Ай бұрын
Glad it was helpful!
@rvrunkillyow716
@rvrunkillyow716 Ай бұрын
What are use cases in using exception locally and globally? Thanks in advance.
@CodeMaze
@CodeMaze Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
​@@CodeMazethanks for the response great explanation
@mek_Morok
@mek_Morok Ай бұрын
How on earth do you have only 15k subscribers??? This video is one of the best tutorials i've seen!
@CodeMaze
@CodeMaze Ай бұрын
:), I need to try harder, I guess :) Thank you for watching the video. Glad it was helpful.
@hassanarafat6430
@hassanarafat6430 Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
Awesome video 👍
@CodeMaze
@CodeMaze Ай бұрын
Thank you! Cheers!
@raleyph
@raleyph Ай бұрын
Thank you! First normal gude for Ocelot on YT))
@CodeMaze
@CodeMaze Ай бұрын
Glad the video was helpful! Thank you for watching it.
@Paul-cb4bc
@Paul-cb4bc Ай бұрын
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 Ай бұрын
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.
@PhucNguyen-yv8pg
@PhucNguyen-yv8pg 15 күн бұрын
await/async ultimate goal is to free the Threads (send the Threads back to the ThreadPool) so it can process other Tasks. If a baker just wait for a cake to be baked in the oven, it would be inefficient, right? Instead, he could go and do some other stuff while waiting for the cake. Same with Threads, with external services, like Database calls (Cloud Database), or Cloud Storage Service (AWS, Azure), your Threads do not need to resolve these, it's the external service Threads' jobs. If you don't release YOUR Threads by using await/async, the Threads will wait and do nothing, and Threads are really limited. So, await/async does not make your functions faster, but rather utilize the resource (Threads).
@CodeMaze
@CodeMaze 15 күн бұрын
Great recapitulation of my video, thanks for that.
@tanjuavsar4847
@tanjuavsar4847 Ай бұрын
Hi thanks for useful information but I couldn't see where you set rabbitmq address ?
@CodeMaze
@CodeMaze Ай бұрын
Thank you for watching the video. I didn't set the address. MassTransit knows it by default via configuration.
@mohamedmatrab
@mohamedmatrab Ай бұрын
Very Useful Thanks
@CodeMaze
@CodeMaze Ай бұрын
You are welcome
@Paul-cb4bc
@Paul-cb4bc Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
I don't have GPU there is any solution ?
@CodeMaze
@CodeMaze Ай бұрын
Try using the same library version I used. These things change so fast - therefore they might have changed something.
@ManojRawat-lp4yc
@ManojRawat-lp4yc Ай бұрын
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 Ай бұрын
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 Ай бұрын
how do we set up profile settings ( deployment mode and Target runtime) when we publish the Windows service on the IIS service?
@sunrise7442
@sunrise7442 Ай бұрын
Nice content!
@CodeMaze
@CodeMaze Ай бұрын
Glad you think so! Thank you for watching.
@damjanvasovic9371
@damjanvasovic9371 Ай бұрын
I saw your new course about microservices , how many hours does the course take ?
@CodeMaze
@CodeMaze Ай бұрын
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 Ай бұрын
I use HangfireAuthorizationFilter but dont work with me can you implement in another video
@CodeMaze
@CodeMaze Ай бұрын
I can't say for sure, but I'll have it in my mind.
@juliansegura5507
@juliansegura5507 Ай бұрын
Loved the UI part. Is it possible to have different APIs on a single UI?
@CodeMaze
@CodeMaze Ай бұрын
To be honest, never tried that. It was usually one UI one API :)
@tarnkappencola1302
@tarnkappencola1302 Ай бұрын
Interesting, as always. Many thanks!
@CodeMaze
@CodeMaze Ай бұрын
Glad you enjoyed it! Thank you for watching the video.