/// <summary> /// Get the root-level exception of the specified exception. /// </summary> /// <param name="exceptionId">The id of an existing exception.</param> private ExceptionLog GetOutermostException(int exceptionId) { var dataContext = GetDataContext(); var exceptionService = new ExceptionLogService(dataContext); var exception = exceptionService.GetNoTracking(exceptionId); return(GetOutermostException(exception)); }