G
G
Georgy Kuznetsov2021-11-27 00:26:38
C++ / C#
Georgy Kuznetsov, 2021-11-27 00:26:38

Should I use EF Core and Dapper in the same project?

Let's use EF Core for CRUD operations and search in the database by criteria, and use Dapper for more complex operations like Join or OrderBy (I would like to get a more complete list)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-11-27
@JoeSmith3100

Yes, this is a very common Pattern, and this is how they do it even in large projects.
But Join with OrderBy can also be written in EF .
But I advise you to look at linq2db .
With it, you can even write complex queries with CTE and window functions on linq
. And it does not have such an overhead as EF.
Of the minuses - there is no built-in mechanism for migrations.
But it seems there is a package for integration with EF - you can describe the scheme and roll migrations using EF, and write queries with linq2db

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question