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
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.
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.
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/
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?
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.
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.
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.
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.
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.
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.
@@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
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
Thank you for your excellent narration
You're very welcome
Believe me the content is amazing.
Thank you very much. It is always great to hear that.
just exactly what I am looking for. Thank you so much.
Great to hear! You are most welcome.
Best tutorial on Dapper. 👏
We are glad it was helpful!
Awesome content. Clear as day man 🍻
Glad you enjoyed it!
Very nicely explained. Thanks Code Maze
You are welcome!
Love this!!!! Excellent!!!!
Glad you like it!
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?
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.
@@CodeMaze Is your last chapter on transactions considered UoW? I usually see it implemented with an interface & a class of its own.
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.
Awesome video! Thanks a lot!
Thank you for watching!
Very good bro,🥰 if possible add content using service layer, repository and calling all this data to controller.
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/
nicely explained!!
Glad you liked it
Thx! Great explanation!
Glad it was helpful!
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?
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.
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?
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.
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
In the description section, you can find a link to the article on our blog site. There, you can find a source code.
although i learnt this your your site.... thanks alot. can you demonstrate how to do authorization on asp.net core api using daper
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.
@@CodeMaze we are waitting for
Quick question, what's the point behind using Dynamic Parameter input to ShowCompanyById instead of just passing the id "new{Id=id}" ?
Thanks
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.
@@CodeMaze In this case is it okay to just pass the object for update or create?
¡Excelente video! Consulta: cómo se consume esto con Blazor? Gracias
verry good
Thanks
Very nice content, but volume is too low! Is it possible to increase the volume!!
Please add a mapster video.
Sure, will do in the future.
code maze not able to access the article , pls look into it
Hi. I am really not sure why is that. Just tested all the links from the description section, and everything is working.
hi perfect video can you use sql injection this project ı wanna entegreted
How to buy your dapper book
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.
company in null again in web api /api/companies/1 at video time 19:53
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.
@@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
If Max Verstappen did code.
:D :D But I would give you my 6th :) :)