Answer the question
In order to leave comments, you need to log in
Is it possible to use two ORMs in a project?
Tell me guys) As we all know that the Entity Framework does not indulge us in performance, in this regard, the question is, is it possible to use two ORMs in a project, dapper - for data fetching, and EF - for changing data?
Answer the question
In order to leave comments, you need to log in
Worried about performance? write with your hands through SqlConnection/Command. Write a Data Access Layer. What to fence the garden - engage in the development of simple wrappers.
Technically possible.
But this method will first of all try to shoot off your legs.
1. Can be used.
2. For most projects, EF will be more than enough. The performance loss is exaggerated. Built-in caching and query optimization mechanisms work.
3. In the "bottleneck" places of the project, you can always use a "light" ORM or a direct call to a SQL query / stored procedure. But only when there is a real need for it.
4. EF saves developer time not only because it's an ORM, but also because it's Microsoft's ORM and Visual Studio is great with it.
PS Just trust someone with 12 years of .NET experience who spent a lot of time to figure out that EF is enough. I read a bunch of articles and benchmarks. I tested myself. Pluses EF more than cover a small loss of speed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question