Coding Short: Dapper and Entity Framework

preview_player
Показать описание
I might be getting in trouble by talking about Dapper and Entity Framework, but I like working with them together. Using Dapper when performance is actually important, and Entity Framework for everything else. Let me show you how I do it.

If you like this video, you might like other videos in my Instructional Videos:

Рекомендации по теме
Комментарии
Автор

"but lets try to be sane....and keep the comments light"
LOL this one killed me xD

abdulseliem
Автор

One popular approach for large scale systems with a requirement for performance is to marry Dapper and EF with CQRS, and have Dapper for all the queries, and EF for all the commands

alan-
Автор

I remember working on a project couple of years ago where i used a combination of Dapper & EntityFramework and i believe it turned to be very good.

ScanWs
Автор

I understand that this is just a shortcode for demonstration purposes, and it is an excellent practice, especially for those just trying to underestimate EF Core. However, When it comes to using Dapper, I believe if we use stored procedures instead of hardcoded TSQL inside C#, It can be much cleaner.

mheidari
Автор

I found this quite useful, thanks! We recently used dapper in our project for a new module even though we already use EF. I found it quite confusing to use at the beginning but after your video I think it's easy. So thanks! (I still prefer linq for EF though).

rytisss
Автор

This is amazing Shawn. At last, someone that thinks like me. I have for some time been a mix of EF and Dapper and using both in my project, depending on what I am needing. It's good to see I'm not alone in this workflow. Now I have discovered you on YouTube, I will be watching more of your videos.

PS - Love the Windows 95 book in the background. And the one on ADOs (may ADOs RIP)

waynehawkins
Автор

I'm not familiar with Dapper, wish you had mentioned what the advantage of using Dapper over, say, sql). Thanks for the video, will look into Dapper. Like your teaching style, have watched a couple of your courses on Pluralsight.

mtranchi
Автор

Trouble is two 'systems' to maintain. But I think EF can be useful to quickly create models if you have an existing database' so using it as a tool rather than in code.

AthelstanEngland
Автор

The question I ask myself when dealing with a heavy ORM like EF vs a light ORM. is does a heavy ORM really provide that much of an advantage, as your data model becomes more complex thinking at the database level becomes a lot more beneficial, and Dapper becomes the clear winner in terms of speed and reduced cognitive load - you're thinking at the right level of abstraction for the problem you're trying to solve.

fadmad
Автор

So why not just use `FromSqlRaw` and Query types? Looks pretty much the same as Dapper.

wittttttt
Автор

Greate video sir. i also use both with my project. is it okay i also use repodb with dapper, entity framework ? combine this 3 ?

ericjhuneespa
Автор

Hi
Is ok to use EF with stored procedure instead of Dapper ?

cissemy
Автор

Can we use the EF FromSqlRaw method to eliminate the need for Dapper?

boho
Автор

@swildermuth amazing and helpful as usual
good work

NourElGhamry