Using Dapper with ASP.NET Core Web API

Поділитися
Вставка
  • Опубліковано 31 жов 2024

КОМЕНТАРІ • 55

  • @CodeMaze
    @CodeMaze  7 місяців тому

    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

  • @ugempireninjaaaaaahatori6755
    @ugempireninjaaaaaahatori6755 9 місяців тому

    Believe me the content is amazing.

    • @CodeMaze
      @CodeMaze  9 місяців тому

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

  • @abdulrazzaktaylor1972
    @abdulrazzaktaylor1972 7 місяців тому

    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  7 місяців тому

      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 7 місяців тому

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

    • @CodeMaze
      @CodeMaze  7 місяців тому +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.

  • @hendrasdrtube
    @hendrasdrtube 11 місяців тому

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

    • @CodeMaze
      @CodeMaze  11 місяців тому

      Great to hear! You are most welcome.

  • @gulsenkeskin1303
    @gulsenkeskin1303 2 роки тому +2

    Thank you for your excellent narration

    • @CodeMaze
      @CodeMaze  2 роки тому

      You're very welcome

  • @Jazz_10110
    @Jazz_10110 Рік тому +1

    Awesome content. Clear as day man 🍻

  • @aht786
    @aht786 Рік тому +1

    Best tutorial on Dapper. 👏

    • @CodeMaze
      @CodeMaze  Рік тому

      We are glad it was helpful!

  • @protapsen1910
    @protapsen1910 Рік тому

    Love this!!!! Excellent!!!!

  • @abbasshijazi2801
    @abbasshijazi2801 Рік тому +1

    Very nicely explained. Thanks Code Maze

  • @I-PixALbI4-I
    @I-PixALbI4-I Рік тому

    Thx! Great explanation!

  • @SandeepKumar-is7gu
    @SandeepKumar-is7gu Рік тому +1

    nicely explained!!

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

  • @victorhugovaldezsoto
    @victorhugovaldezsoto 2 роки тому +2

    Awesome video! Thanks a lot!

    • @CodeMaze
      @CodeMaze  9 місяців тому +1

      Thank you for watching!

  • @marioescudero7103
    @marioescudero7103 Рік тому

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

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

  • @FreadJohnson
    @FreadJohnson Рік тому

    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  Рік тому

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

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

  • @deep87
    @deep87 Рік тому

    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  Рік тому

      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.

  • @Manithan123
    @Manithan123 8 місяців тому

    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  8 місяців тому +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.

  • @harrisonwell1719
    @harrisonwell1719 3 місяці тому

    How to buy your dapper book

    • @CodeMaze
      @CodeMaze  3 місяці тому

      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.

  • @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  9 місяців тому

      Sure, will do in the future.

  • @sametbayraktar5921
    @sametbayraktar5921 2 роки тому

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

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

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

  • @stevejohnny1111
    @stevejohnny1111 Рік тому +2

    If Max Verstappen did code.

    • @CodeMaze
      @CodeMaze  Рік тому +1

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