Junior — Middle
Can you name popular libraries or tools for working with object-relational mapping?
sobes.tech AI
Answer from AI
Popular libraries and tools for working with Object-Relational Mapping (ORM) in C#:
- Entity Framework (EF) — Microsoft's official ORM, supports LINQ queries, migrations, and working with various DBMS.
- Dapper — lightweight micro-ORM focused on high performance and simplicity.
- NHibernate — powerful and flexible ORM with rich functionality, inspired by Hibernate from Java.
Example of using Entity Framework to get a list of users:
using(var context = new AppDbContext())
{
var users = context.Users.ToList();
}