public static ErrorStack ToProjectLocalTime(this ErrorStack errorStack, IProjectRepository repository) { if (errorStack == null) { return(null); } return(errorStack.ToProjectLocalTime(repository.GetByIdCached(errorStack.ProjectId))); }