I was already somewhere and once gave an answer to this question and, which is rather strange, I searched it and did not find it = (

Found the following speed comparison table: enter image description here With this, everything is clear about it ... But ... Who will say which of the above is more convenient to use and why?

Closed due to the fact that it is necessary to reformulate the question so that you can give an objectively correct answer to the party PashaPash Jan 2 '17 at 10:07 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    ORM is not for speed, but for convenience. If you are comfortable without it, use sqlreader - Monk
  • @Monk He asked "Who will say what is more convenient to use and why?". - Vadim Ovchinnikov
  • 2
    @Andrew: Uh ... And how can you give an objective answer to your question? - VladD

1 answer 1

If you want to work with the entire database through ORM and not bother with queries, then your choice is NHibernate and the Entity Framework .

EF is available out of the box, and NHibernate needs to be downloaded. Mikey promises that EF7 will catch up with NHibernate in performance.

As far as I know Linq2Sql does not develop => dead.

When using a full-fledged ORM (which are EF and NHibernate ), maximum convenience and abstraction from low-level SQL code is achieved, but performance is lost due to the fact that non-optimal queries are generated.

Micro-ORM is an ORM that does not replace the work with SQL queries, but makes it convenient. Because of this, as you could see in the tablet, Micro-ORM is in the first places.

If you have a goal to write your ORM , then Micro ORM , for example Dapper, which facilitates direct work with queries, is suitable for such purposes.

For example, you do not need to create parameters with handles, but you can pull them out during EXECUTE and Dapper will map everything.

In general, the choice of ORM depends on specific goals and what I wrote above is what I worked with, but based on this, some conclusions can be made.

  • "do not replace work with SQL queries" - not exactly. Mostly provide C (R) UD, but moreover they can hide queries for LINQ (for example linq2db) or query builder (for example Dapper.FastCRUD). - vitidev