c# - Can I disable MiniProfiler's duplicate SQL warnings for a block of code? -
miniprofiler detects "duplicate" sql queries , gives red exclamation mark in corner when detects them (i'm using miniprofileref link in code-first ef database access). useful, these duplicate queries justified, when i'm updating 50 users in parametrized way; 49 going detected duplicate queries.
is there way, then, me disable duplicate sql query detection block of code? like:
using (miniprofiler.current.step("do bulk updates"), options.noduplicatesqlchecking) { // ... } ... good.
looking @ miniprofiler code, line seems checking duplicates:
https://github.com/samsaffron/miniprofiler/blob/master/stackexchange.profiling/miniprofiler.idbprofiler.cs#l91
doesn't there's way @ moment. guess stats.isduplicate never have set true if option specified, it's tricky doing particular block of code. alternatively maybe parameters sql command string taken account somehow, change, bulk operations.
just found answer own question; can use miniprofiler.current.ignore() stop profiling of sections of code:
using (miniprofiler.current.ignore()) { // ... } this pretty want; slight annoyance stops profiling altogether. i'd rather kept listing sql queries didn't label them duplicates, oh well.
Comments
Post a Comment