Build a Web API & Make HTTP Calls with Blazor WebAssembly | Blazor Blog Series #3

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024

Комментарии • 22

  • @PatrickGod
    @PatrickGod  3 года назад +3

    I have added some code handling the 404 NotFound afterwards. It is available on GitHub. Link in the video description. Enjoy & thanks for watching! 😊

    • @charliekrew1861
      @charliekrew1861 3 года назад

      i realize Im quite randomly asking but do anybody know of a good place to watch newly released movies online ?

    • @jamietristan9528
      @jamietristan9528 3 года назад

      @Charlie Krew Meh try Flixportal. You can find it by googling =) -jamie

    • @charliekrew1861
      @charliekrew1861 3 года назад

      @Jamie Tristan thanks, I went there and it seems like they got a lot of movies there =) I appreciate it!!

    • @jamietristan9528
      @jamietristan9528 3 года назад

      @Charlie Krew happy to help xD

  • @ebogdan1037
    @ebogdan1037 3 года назад

    Second video ..... so far great stuff ... 👍👏

  • @TYNEPUNK
    @TYNEPUNK 6 месяцев назад

    really nice, have you done one on posting json to db?

  • @talkathiriify
    @talkathiriify 3 года назад +1

    Thanks Patrick for sharing the good things.

    • @PatrickGod
      @PatrickGod  3 года назад

      Thank you for your kind words! :)

  • @activex7327
    @activex7327 3 года назад +2

    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
      @PatrickGod  3 года назад

      Could you please show us some code? I'm not following...

    • @activex7327
      @activex7327 3 года назад +1

      @@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.

    • @Sad-Lemon
      @Sad-Lemon 2 года назад

      Just wanted to state exact same thing :)

  • @m0ty
    @m0ty Год назад +1

    Doing this tutorial and kinda lost. New project no longer makes Client/Server/Shared structure by default.

  • @galaxiegalaxie5003
    @galaxiegalaxie5003 3 года назад +1

    Thank you for wonderful video,could you also give an introduction of refit library😁

    • @PatrickGod
      @PatrickGod  3 года назад

      Thank you very much! :) I'm afraid I'm not familiar with refit. Do you have a link for me? ;)
      Take care,
      Patrick

  • @sergiq2
    @sergiq2 Год назад +1

    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 ?

  • @abobonickname5696
    @abobonickname5696 3 года назад +1

    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
      @PatrickGod  3 года назад +1

      Hm.. could provide a URL to the movieDB? I would try to use an instance of the HttpClient class to get the data.

    • @abobonickname5696
      @abobonickname5696 3 года назад

      @@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

  • @davidoku6185
    @davidoku6185 3 года назад

    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

    • @PatrickGod
      @PatrickGod  3 года назад

      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?