Getting Started with Dapper in .NET

preview_player
Показать описание

In today's video, we'll see how simple it is to get started with the dapper NuGet package and use it to execute SQL queries against our postgres database.

Connect with me on 'em socials:

Check out all my courses on DomeTrain:

Support the channel and get the source code:

Thanks for watching, don't forget to like & comment & subscribe! ❤️ 💻
Рекомендации по теме
Комментарии
Автор

Really good video, learnt some things I didn't know here (I'm not a dev), but now thinking of how I can apply this to my own projects. 😃

Radictor
Автор

Please add numbers to the title of the videos. i clicked on the playlist link and it's a bit confusing in what order i should watch them

fanaccount
Автор

4:45 Best practice/Performance tip: return a boolean or an Error object instead of throwing an exception. For methods that return valid values, such as GetByIdAsync, you can use OneOf or ErrorOr libraries to return an explicit "not found" instead of using null as an implicit case.

ahupond
Автор

Thanks for the video but I actually don't want to find myself writing sql queries on the code side. Sometimes I can add a new feature to a class and then I need to change or update the sql query that I defined as dapper query in my repository. btw I know the dapper's power.

recaicingoz
Автор

I haven’t used Dapper in 15 years, it’s barely changed, it certainly isn’t a EF CORE killer, but is worth knowing for the few scenarios it does a better job than EF CORE

andrewboyd
Автор

Hi, Amichai. Thanks for the video.
Can you say please is it would be a good idea to change our insert and select queries using string interpolation for naming columns using nameof(Product.Name) for example instead of hardcoding column titles in query string?

andihell
Автор

Thanks very much Amichai for this video.

I'd like you make video how is your vscode settings, add-ons, settings, tips e etc. I notice that your vscode look like vim editor. Again, thank you.

Morgansanto
Автор

Can we use the generic repository pattern like in EF core or do we have to write distinct queries for every entity?

vuhoang
Автор

I have been seeing singular names for repositories out there, like "ProductRepository" instead of "ProductsRepository". Which makes more sense?

tchial
Автор

why scoped for IDBConnectionFactory class?

ashoktandan
Автор

Cool! Shouldn't we reuse the opened DB connection tho?

johnnyggun
Автор

CancellationTokens are missing. Dapper lines should change a little bit to use CommandDefinition that takes cancellation tokens.

meetingattender
Автор

Thanks for the video.

In the work environment, do you use postgre SQL or MSSQL? I ask it because in macOS you cannot use the MSSQL. I wonder how do you handle it?

cemkaya
Автор

Great video as always. One question I have is why did we go with Dapper instead of EF?

boring
Автор

I think you should be AddSingleton instead AddScoped, correct me if I'm wrong

harrisonwell
Автор

Great video but with the recent developments of EF Dapper it is no longer as beneficial as before.

Totti
Автор

Why the heck are you using primary constructors and assigning a private field variable? Just use the parameter directly. Thats the point of it

Siddiskongen
Автор

Sorry, but Dapper went out of fashion 15 years ago. And so did the bad practice of writing non-parameterised raw SQL into code.
EF provides a much better way of doing things.

gppsoftware