public IActionResult UserInfo([FromRoute] string id) { #region FindingOnSqlServer _timeMeasurement.StartWatch(); _userOperation.GetSingleUser(id, DbType.SqlServer); _timeMeasurement.StopWatch(); TimeSpan spentTimeOnSqlServer = _timeMeasurement.PrintTimeSpent(); #endregion _timeMeasurement.ResetWatch(); #region FindingOnMongoDB _timeMeasurement.StartWatch(); _userOperation.GetSingleUser(id, DbType.MongoDB); _timeMeasurement.StopWatch(); TimeSpan spentTimeOnMongoDB = _timeMeasurement.PrintTimeSpent(); #endregion return(Json(new { elapsed_Time_On_SQL_Server = spentTimeOnSqlServer.ToString(), elapsed_Time_On_MongoDB = spentTimeOnMongoDB.ToString() })); }