In the implementation of service methods, there's no reason to await, just return the task, it is more efficient since state machine doesn't have to be created.
@@PatrickGod In the service method, instead of doing this: return await MyAsyncCall(); Do this: return MyAsyncCall(); Every time you place an await you force the complier to create state machine.
Hi Patric, Using Web API is obvious when you have Blazor WebAssembly but how it is with Blazor Server ? As I understood, the whole C# code which I have inside .razor files is a code on the server side and SingnalR plays the role when updating some bounded properties. So in case where I don't want to share Web API with other platforms/apps, there is no need to use Web API because it cause a weird situation where Blazor call server code (via SignalR) and server code call Web API which is also on the server side but hosted by another process, so 2 requests instead of 1 request and unable to debug ? Am I right or I missed something ? Can you clarify ?
Could you make a video that uses external API? That will be a more practical scenario. The movieDB is a good API to use. I am making this suggest based on a challenge I faced with blazor. I was not able to get response from external source because of CORS. Pls make a tutorial on how to get JSON from external API and store in database using entity framework
@@PatrickGod www.themoviedb.org/documentation/API you would need to Register to generate an API key but I can give you my generated API key if you don't want to register
Thanks a again... I am new to blazor and I have been following your tutorial diligently .I got stuck here #3. After writing all the code as instructed in this video I realized my blazor App did not update with the new data from the api. I think this is happening because from the beginning I have started dotnet watch Run for the web assembly only and all the code we have been writing was for the web assembly. Now getting to #3 we are building the api on the server side how do I get them Connected now? It appears my webapp doesn't know about the server ...i am really stuck here.. I've gone back to see if I can get it. I am so lost... Please help
I have added some code handling the 404 NotFound afterwards. It is available on GitHub. Link in the video description. Enjoy & thanks for watching! 😊
i realize Im quite randomly asking but do anybody know of a good place to watch newly released movies online ?
@Charlie Krew Meh try Flixportal. You can find it by googling =) -jamie
@Jamie Tristan thanks, I went there and it seems like they got a lot of movies there =) I appreciate it!!
@Charlie Krew happy to help xD
Second video ..... so far great stuff ... 👍👏
really nice, have you done one on posting json to db?
Thanks Patrick for sharing the good things.
Thank you for your kind words! :)
In the implementation of service methods, there's no reason to await, just return the task, it is more efficient since state machine doesn't have to be created.
Could you please show us some code? I'm not following...
@@PatrickGod In the service method, instead of doing this: return await MyAsyncCall(); Do this: return MyAsyncCall(); Every time you place an await you force the complier to create state machine.
Just wanted to state exact same thing :)
Doing this tutorial and kinda lost. New project no longer makes Client/Server/Shared structure by default.
Thank you for wonderful video,could you also give an introduction of refit library😁
Thank you very much! :) I'm afraid I'm not familiar with refit. Do you have a link for me? ;)
Take care,
Patrick
Hi Patric,
Using Web API is obvious when you have Blazor WebAssembly but how it is with Blazor Server ?
As I understood, the whole C# code which I have inside .razor files is a code on the server side and SingnalR plays the role when updating some bounded properties.
So in case where I don't want to share Web API with other platforms/apps, there is no need to use Web API because it cause a weird situation where Blazor call server code (via SignalR) and server code call Web API which is also on the server side but hosted by another process, so 2 requests instead of 1 request and unable to debug ?
Am I right or I missed something ? Can you clarify ?
Could you make a video that uses external API? That will be a more practical scenario. The movieDB is a good API to use. I am making this suggest based on a challenge I faced with blazor. I was not able to get response from external source because of CORS. Pls make a tutorial on how to get JSON from external API and store in database using entity framework
Hm.. could provide a URL to the movieDB? I would try to use an instance of the HttpClient class to get the data.
@@PatrickGod www.themoviedb.org/documentation/API you would need to Register to generate an API key but I can give you my generated API key if you don't want to register
Thanks a again... I am new to blazor and I have been following your tutorial diligently .I got stuck here #3. After writing all the code as instructed in this video I realized my blazor App did not update with the new data from the api. I think this is happening because from the beginning I have started dotnet watch Run for the web assembly only and all the code we have been writing was for the web assembly. Now getting to #3 we are building the api on the server side how do I get them Connected now? It appears my webapp doesn't know about the server ...i am really stuck here.. I've gone back to see if I can get it. I am so lost... Please help
Hey David, did you check the box to create an "ASP.NET Core hosted" app, so that you also get the server project in the solution?