2
NotSoap
6y

Any opinions on using Entity Framework vs Dapper for an API for a vue SPA Web app?
I have used both, and it seems it is a trade off of more control vs convenience.

Comments
  • 1
    Personally I prefer the control. I've also profiled the exact SQL queries entity framework runs for various operations, and one time the query was so horribly structured that the performance was super bad. EF works fine for basic CRUD operations but if it even becomes remotely complex I'd use Dapper.
  • 0
    @duckWit Thanks for the response.
    I have heard something about how EF can get terrible if you aren't careful, and I don't feel like SQL is as easy to fuck up.
    I don't have much time for it, so I was hoping for a shortcut. 😁
  • 0
    Ef core is supposed to be really performant I heard
  • 0
    Don't pre optimize something that doesn't need to be optimized. Use EF, it will make you 5x faster than making all "manually" and with dapper. If you run into performance(you won't for 90% of queries) issues, nothing is stopping you to just write stored procedure for that particular query. Don't get me wrong, we use Dapper at work everyday because we have millions of data every week. I also wrote my own extension methods for dapper to generate some parameters and queries but on my personal projects I always go with EF because no DB guy can match the speed of development with EF code first. And remember, the best project is finished project :)
Add Comment