Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Entity Framework and Dapper, Working Together


Published on

Talk from Atlanta SQL Saturday

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Entity Framework and Dapper, Working Together

  1. 1. Shawn Wildermuth Microsoft MVP, Author, and Speaker @shawnwildermuth Optimizing Data Access Mixing Entity Framework Core and Dapper
  2. 2. Who Am I? Author, Instructor, Coach Pluralsight Author > 20 Courses to my name Wilder Minds Training Courses on Vue, Bootstrap 4 & SignalR Making a Film Hello World Film
  3. 3. Optimization Basics Speed is Everything But is it really? Can’t optimize if you can’t measure Premature optimization anti-pattern
  4. 4. What to Optimize? Too easy to optimize the wrong thing… Before you optimize…measure, twice Long running queries aren’t always bad Learn how to read an execution plan
  5. 5. Is Entity Framework That Bad? Entity Framework Gets a Bad Rap Does the simple stuff really well It’s slower than raw execution But within the benefits of its simplicity Improved greatly since 1.0-4.0 timeframe
  6. 6. What is Dapper? StackExchange’s SQL-Serialization Lib Extends ADO.NET to do object mapping Expects you to do SQL yourself Allows fine-grained control of queries Harder to do the simple things
  7. 7. What is Dapper? Open Source Full set of perf tests against other libs Side-by-side with ORMs is easy Large community support
  8. 8. Demo Performance Differences
  9. 9. Demo Using Dapper
  10. 10. Demo Something more complex
  11. 11. Takeaways Get It: My Blog (for this demo):