Yes, of course. Just use HttpClient as you would in any other consumer app.
@Saleh_Mohammd3 күн бұрын
Very informative, thx
@CodeMaze2 күн бұрын
You are welcome, I am glad you found the video helpful.
@prasadgopi8316 күн бұрын
Good one.
@CodeMaze6 күн бұрын
Thanks, glad you liked it!
@kakhatezelashvili33689 күн бұрын
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.
@CodeMaze8 күн бұрын
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.
@kakhatezelashvili33687 күн бұрын
@@CodeMaze thanks for your answer again, amazing work ;)
@santoshkumaryadav443611 күн бұрын
nice and clear, great effort !!
@CodeMaze9 күн бұрын
I appreciate the kind words! Thank you too for watching the video.
@luizgagliardi661413 күн бұрын
Great video! When using the typed HttpClient, you did not use the HttpClientFactory. In that case, what's the point of injecting the HttpClientFactory?
@CodeMaze12 күн бұрын
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.
@Nims9914 күн бұрын
Thanks!!! ❤
@CodeMaze13 күн бұрын
You are very welcome. Thank you too for watching the video.
@Nims9913 күн бұрын
@@CodeMaze ❤
@MaheshKumar-bg5re14 күн бұрын
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.
@CodeMaze14 күн бұрын
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.
@Decoretum14 күн бұрын
Good day! I appreciate you for making this video! What is ProcessorResolverKeys? Is it an enum or a class? What is its structure?
@CodeMaze14 күн бұрын
Hi. Thank you for watching the video. It is a class with some constants.
@MaheshKumar-bg5re17 күн бұрын
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?
@CodeMaze17 күн бұрын
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-bg5re18 күн бұрын
Do you have udemy courses? By the way, wonderful video
@CodeMaze18 күн бұрын
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-bg5re18 күн бұрын
Hi, What is the difference with AddIdentity and AddIdentityCore? Is it okay to use AddIdentityCore?
@CodeMaze18 күн бұрын
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.
@shahidwani644519 күн бұрын
What if hacker gets both tokens
@CodeMaze18 күн бұрын
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.
@deepakkataria350021 күн бұрын
Really very help full and Informative video. Great Job.👍
@CodeMaze21 күн бұрын
Thank you! I am glad you found the video helpful.
@joejoe245224 күн бұрын
So it only works with some what if users have different emails like Gmail, yahoo, hotmail can email still be send to everyone successfully
@CodeMaze24 күн бұрын
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.
@joejoe245224 күн бұрын
@@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?
@CodeMaze24 күн бұрын
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.
@navyanavilu263927 күн бұрын
The video was very helpful!!! Thank you so much.
@CodeMaze26 күн бұрын
Glad it was helpful! Thank you too for watching it.
@kongchu359828 күн бұрын
Thank you very much
@CodeMaze27 күн бұрын
You are welcome. Thank you for watching.
@onlineaccounts-l1q29 күн бұрын
Great content, thanks for creating and sharing. 💯❤
@CodeMaze29 күн бұрын
My pleasure! Thank you for watching the video.
@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Ай бұрын
Thank you very much, brother. I got everything right except for the hierarchy issue :)
@CodeMazeАй бұрын
I am glad the video helped you. Yeah, this has to be configured in a certain place in the middleware's hierarchy.
@STEVESTACELАй бұрын
Do you have a video with FluentMail being used with Gmail
@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Ай бұрын
Thank you very much. You are awesome.
@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Ай бұрын
This helped tons. Thank you
@CodeMazeАй бұрын
Glad to hear it! Thank you for watching the video.
@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Ай бұрын
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Ай бұрын
@@CodeMaze that is exactly what you did, thank you kindly!
@TheMostafa5000Ай бұрын
That was awesome, Thanks.
@CodeMazeАй бұрын
You're welcome! Thank you for watching the video.
@asadnaeem123Ай бұрын
no comparison of @CodeMaze👍
@TheMostafa5000Ай бұрын
That was very useful, Thanks.-
@CodeMazeАй бұрын
Glad it was helpful!
@rvrunkillyow716Ай бұрын
What are use cases in using exception locally and globally? Thanks in advance.
@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Ай бұрын
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Ай бұрын
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Ай бұрын
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Ай бұрын
@@CodeMazethanks for the response great explanation
@mek_MorokАй бұрын
How on earth do you have only 15k subscribers??? This video is one of the best tutorials i've seen!
@CodeMazeАй бұрын
:), I need to try harder, I guess :) Thank you for watching the video. Glad it was helpful.
@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Ай бұрын
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Ай бұрын
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Ай бұрын
Awesome video 👍
@CodeMazeАй бұрын
Thank you! Cheers!
@raleyphАй бұрын
Thank you! First normal gude for Ocelot on YT))
@CodeMazeАй бұрын
Glad the video was helpful! Thank you for watching it.
@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Ай бұрын
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-yv8pg15 күн бұрын
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).
@CodeMaze15 күн бұрын
Great recapitulation of my video, thanks for that.
@tanjuavsar4847Ай бұрын
Hi thanks for useful information but I couldn't see where you set rabbitmq address ?
@CodeMazeАй бұрын
Thank you for watching the video. I didn't set the address. MassTransit knows it by default via configuration.
@mohamedmatrabАй бұрын
Very Useful Thanks
@CodeMazeАй бұрын
You are welcome
@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Ай бұрын
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Ай бұрын
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Ай бұрын
I don't have GPU there is any solution ?
@CodeMazeАй бұрын
Try using the same library version I used. These things change so fast - therefore they might have changed something.
@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Ай бұрын
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Ай бұрын
how do we set up profile settings ( deployment mode and Target runtime) when we publish the Windows service on the IIS service?
@sunrise7442Ай бұрын
Nice content!
@CodeMazeАй бұрын
Glad you think so! Thank you for watching.
@damjanvasovic9371Ай бұрын
I saw your new course about microservices , how many hours does the course take ?
@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Ай бұрын
I use HangfireAuthorizationFilter but dont work with me can you implement in another video
@CodeMazeАй бұрын
I can't say for sure, but I'll have it in my mind.
@juliansegura5507Ай бұрын
Loved the UI part. Is it possible to have different APIs on a single UI?
@CodeMazeАй бұрын
To be honest, never tried that. It was usually one UI one API :)
@tarnkappencola1302Ай бұрын
Interesting, as always. Many thanks!
@CodeMazeАй бұрын
Glad you enjoyed it! Thank you for watching the video.