mercredi 31 décembre 2014

EF 6 Database hit Count

I'm trying to count how many database hits have been executed to run an function.


Background: I'm trying to run unit tests on a Web API application to protect against dumb coding errors (forgetting to add an include), and currently the unit tests are running against a full database, so I want to test how many hits that DB is taking per test.


An idea I had was to query Glimpse but I can't figure out how to instantiate it for unit testing.


Aucun commentaire:

Enregistrer un commentaire