public IActionResult UsersInfo() { #region FindingOnSqlServer _timeMeasurement.StartWatch(); _userOperation.GetAllUsers(DbType.SqlServer); _timeMeasurement.StopWatch(); TimeSpan spentTimeOnSqlServer = _timeMeasurement.PrintTimeSpent(); #endregion _timeMeasurement.ResetWatch(); #region FindingOnMongoDB _timeMeasurement.StartWatch(); _userOperation.GetAllUsers(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() })); }