MiniProfiler.ToJson() will serialize the SqlTime.FormattedCommandString (which only has a getter) and not CommandString (which is tagged with [ScriptIgnore])
This means that if you do the following:
var profiler2 = MiniProfiler.FromJson(MiniProfiler.ToJson(profiler));
I wasn’t actually running that code, but it was a concise way to report and test the problem. What I was really doing is having my webpage call a service that ran SQL and trying to merge the timings together (similar to how the WCF code in MiniProfiler works).
@joe I wasn’t actually running that code, but it was a concise way to report and test the problem. What I was really doing is having my webpage call a service that ran SQL and trying to merge the timings together (similar to how the WCF code in MiniProfiler works).