|
Answer» .NET DEVELOPERS are allowed to work with relational data using domain-specific objects by object-relational mappers such as Entity Framework (EF) and Dapper. Performance-wise, Dapper is the King of Micro ORMs. - Dapper: A simple micro ORM, Dapper is considered a powerful system used for data ACCESS in the .NET world. As a means to address and open-source their issues, the Stack Overflow team created Dapper. Adding this NuGet library to your .NET project allows you to perform database operations. In terms of speed, it is the king of Micro ORMs and is almost as fast as using raw ADO.NET data readers.
- Entity Framework: It is a set of .NET APIs used in software development for performing data access. It is Microsoft's official TOOL for accessing data.
COMPARISON - According to NuGet downloads and performance, Dapper is the world's most popular Micro ORM. In contrast, Entity Framework is significantly slower than Dapper.
- In comparison to other ORMs, such as the Entity Framework, Dapper does not generate as much SQL, but it does an excellent job mapping from database columns to CLR properties.
- Since Dapper uses RAW SQL, it can be difficult to code, especially when multiple relationships are involved, but when a lot of data is involved and performance matters, it is worth the effort.
- Since Dapper uses IDbConnection, developers can execute SQL queries to the database directly RATHER than put data in other objects as they do in Entity Framework.
|