I have stumbled across a very curious issue of poor performance when asp.net MVC control is called by jquery $.ajax function. The control performs a database action that tak
I found the issue and the issue IS with the database call. However, the reason I was at first misled is the piece of code that calculates the time difference.
DateTime start = DateTime.Now;
SearchResult myReportsResult = _repository.GetResults(searchCriteria);
DateTime got_it = DateTime.Now;
TimeSpan diff = (got_it - start);
int diff_ms = diff.Milliseconds;
This code did not give me the correct milliseconds value.