Using Dapper with ASP.NET Core Web API

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

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

  • @CodeMaze
    @CodeMaze  5 месяцев назад

    Thank you all for watching and for your support.
    ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM
    ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33

  • @gulsenkeskin1303
    @gulsenkeskin1303 Год назад +2

    Thank you for your excellent narration

  • @ugempireninjaaaaaahatori6755
    @ugempireninjaaaaaahatori6755 8 месяцев назад

    Believe me the content is amazing.

    • @CodeMaze
      @CodeMaze  8 месяцев назад

      Thank you very much. It is always great to hear that.

  • @hendrasdrtube
    @hendrasdrtube 9 месяцев назад

    just exactly what I am looking for. Thank you so much.

    • @CodeMaze
      @CodeMaze  9 месяцев назад

      Great to hear! You are most welcome.

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

    Best tutorial on Dapper. 👏

    • @CodeMaze
      @CodeMaze  Год назад

      We are glad it was helpful!

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

    Awesome content. Clear as day man 🍻

    • @CodeMaze
      @CodeMaze  Год назад

      Glad you enjoyed it!

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

    Very nicely explained. Thanks Code Maze

  • @protapsen1910
    @protapsen1910 11 месяцев назад

    Love this!!!! Excellent!!!!

    • @CodeMaze
      @CodeMaze  10 месяцев назад

      Glad you like it!

  • @abdulrazzaktaylor1972
    @abdulrazzaktaylor1972 5 месяцев назад

    Thank you for the clear and direct tutorial. Question on unit of work, when do you see it necessary to be implemented, and when to avoid/not need it?

    • @CodeMaze
      @CodeMaze  5 месяцев назад

      Hi. Thank you for watching. Regarding your question, I think you should have it in your app always if you are using Dapper. We almost always want to group multiple operations, that form a single unit of work, and handle those inside a transaction. That's where UoW is the best. Since in a real-world apps, you almost always have grouped operations, I see no reason not to have UoW implemented.

    • @abdulrazzaktaylor1972
      @abdulrazzaktaylor1972 5 месяцев назад

      @@CodeMaze Is your last chapter on transactions considered UoW? I usually see it implemented with an interface & a class of its own.

    • @CodeMaze
      @CodeMaze  5 месяцев назад +1

      Well, no. It is definitely not an UoW pattern, but with it implemented like that, you can certanly excute multiple operations inside the transaction body. But again, I didn't implement an UoW pattern in this video.

  • @victorhugovaldezsoto
    @victorhugovaldezsoto 2 года назад +2

    Awesome video! Thanks a lot!

    • @CodeMaze
      @CodeMaze  7 месяцев назад +1

      Thank you for watching!

  • @Katha_Samputi
    @Katha_Samputi 2 года назад +1

    Very good bro,🥰 if possible add content using service layer, repository and calling all this data to controller.

    • @CodeMaze
      @CodeMaze  2 года назад

      Thank you Poola. In our Ultimate ASP.NET Core book package, we are about to add the Dapper book with ASP.NET Core Web API where we do exactly that. With that new book, we are replacing EF Core from the main book. So, you have a repository layer, service layer, and complete clean architecture project. I think we will publish the book in a day or two. You can learn more about the books here: code-maze.com/ultimate-aspnetcore-webapi-second-edition/

  • @SandeepKumar-is7gu
    @SandeepKumar-is7gu Год назад +1

    nicely explained!!

  • @I-PixALbI4-I
    @I-PixALbI4-I 11 месяцев назад

    Thx! Great explanation!

    • @CodeMaze
      @CodeMaze  11 месяцев назад

      Glad it was helpful!

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

    Why are you creating different folders within the main solution and putting everything in them creating a monolithic solution instead of creating an n-tier architecture?

    • @CodeMaze
      @CodeMaze  6 месяцев назад +1

      Hi. Well, first, you would learn nothing more about Dapper if I created any sort of multi-project solution. Second, there was no point in creating any N-tire architecture for this project as it is pretty simple. Finally, when we talk about architecture, you should be very careful about overengineering. If you don't need layers, don't use them, a simple monolithic structure will be perfect, as it is right now.

  • @deep87
    @deep87 11 месяцев назад

    What if a user just updates a single field, would we still go ahead and update all the columns or there is a different approach for that?

    • @CodeMaze
      @CodeMaze  11 месяцев назад

      As much as I can read and remember there are some extension libraries that can help you with that, but I think, from the box, Dapper doesn't offer such a functionality. Not 100% sure now, but if you search for Partial Updates with Dapper on Google, you will get some different results there.

  • @user-ob3nq5jk7s
    @user-ob3nq5jk7s 11 месяцев назад

    How can i get the querry you pasted on the new created dapper database ...so i can use it in my practice before modifying to my own

    • @CodeMaze
      @CodeMaze  11 месяцев назад

      In the description section, you can find a link to the article on our blog site. There, you can find a source code.

  • @sabicode9689
    @sabicode9689 2 года назад +1

    although i learnt this your your site.... thanks alot. can you demonstrate how to do authorization on asp.net core api using daper

    • @CodeMaze
      @CodeMaze  2 года назад +1

      We are preparing a new book as a part of our Web API package, which will replace EF Core with Dapper and there we have explained how we can use Dapper with ASP.NET Core Identity. Basically, there are some open-source libs out there which we can modify to suit our needs and use it as the wrapper for Identity stores.

    • @mindongokanikirex6003
      @mindongokanikirex6003 2 года назад

      @@CodeMaze we are waitting for

  • @harrisonwell1719
    @harrisonwell1719 Год назад

    Quick question, what's the point behind using Dynamic Parameter input to ShowCompanyById instead of just passing the id "new{Id=id}" ?
    Thanks

    • @CodeMaze
      @CodeMaze  Год назад

      We are using DynamicParameter class only for the Create and Update actions. For the GetCompany action, we use a simple anonymous object as an argument.

    • @harrisonwell1719
      @harrisonwell1719 Год назад

      @@CodeMaze In this case is it okay to just pass the object for update or create?

  • @marioescudero7103
    @marioescudero7103 Год назад

    ¡Excelente video! Consulta: cómo se consume esto con Blazor? Gracias

  • @mindongokanikirex6003
    @mindongokanikirex6003 2 года назад +1

    verry good

  • @softwareengineertrader1562
    @softwareengineertrader1562 Год назад

    Very nice content, but volume is too low! Is it possible to increase the volume!!

  • @robiulhassan4263
    @robiulhassan4263 2 года назад +2

    Please add a mapster video.

    • @CodeMaze
      @CodeMaze  7 месяцев назад

      Sure, will do in the future.

  • @mirrahmathullahimranimran400
    @mirrahmathullahimranimran400 Год назад

    code maze not able to access the article , pls look into it

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

      Hi. I am really not sure why is that. Just tested all the links from the description section, and everything is working.

  • @sametbayraktar5921
    @sametbayraktar5921 2 года назад

    hi perfect video can you use sql injection this project ı wanna entegreted

  • @harrisonwell1719
    @harrisonwell1719 2 месяца назад

    How to buy your dapper book

    • @CodeMaze
      @CodeMaze  2 месяца назад

      It is a bonus book as part of the Premium edition. The main book explains API development in detail and Dapper just uses other ORM. This is why we don't sell it separately. Now is the best chance for the purchase as we have ongoing summer sale.

  • @RameshKumar-zz8uk
    @RameshKumar-zz8uk Год назад

    company in null again in web api /api/companies/1 at video time 19:53

    • @CodeMaze
      @CodeMaze  Год назад

      To be honest, I am not sure what you mean by "company in null" and especially by "again". If your results are not as the results from the video, you can always visit the article on our site (the link is in description), and then download the full source code. Everything must be as in the video.

    • @Kiwi-ot3gg
      @Kiwi-ot3gg Год назад

      @@CodeMaze Think he was referring to the company “Name” coming out as null. Just change the query to include “Name as CompanyName” as done previously for GetCompanies() in the CompanyRepository file

  • @jspesh
    @jspesh Год назад +2

    If Max Verstappen did code.

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

      :D :D But I would give you my 6th :) :)