on-internet
← Community

Why Entity Framework performs faster than Dapper in direct select statement

Stack Overflow ·

I'm new to using ORM in dealing with database, Currently I'm making a new project and I have to decide if i'll use Entity Framework or Dapper. I read many articles which says that Dapper is faster than Entity Framework. So I made 2 simple prototype projects one using Dapper and the other uses Entity Framework with one function to get all the rows from one table. The table schema as the following picture and the code for both projects as the following for Dapper project System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); sw.Start(); IEnumerable<Emp> emplist = cn.Query<Emp>(@"S

Comments

Sign in or sign up to comment and upvote.

No comments yet.