Thursday, March 14, 2019

Good tutorial / book / video series on optimising EF core queries and best practices?

I'm looking for some more advanced materials on how to write good EF code, particularly efficient queries, not just simple queries but ones with many includes. How to diagnose bad performing queries / tools to use and what steps can be used to mitigate common problems.

I had a look on pluralsight but the videos on there are lack luster, seems like pluralsight has gone down hill somewhat since i was using it actively a few years ago. Any alternatives?

Most of the EF core materials online are pretty basic, so looking for something more advanced but still pragmatic with code bloat vs getting the job done. For one, I haven't seen online any decent repository patterns. I find it much more efficient to just query the DbContext in the service layer and do my work there. Yes it does introduce a dependency on sql server, but we can get around this in unit testing by using SQL lite, yes i realise these are more like integration tests, but i find that testing this way is much more productive e.g. you export the results of your query on your regular db and you load them as test data for your unit tests in SqlLite, but i digress.

Looking to see if there are some quality EF core tutorials for more complex query scenarios. As another example, how to rollback transactions if required with best practices etc

Good tutorial / book / video series on optimising EF core queries and best practices? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team