public PartialViewResult TechnicalAssistanceParameters() { Check.Assert(MultiTenantHelpers.UsesTechnicalAssistanceParameters(), "This feature is not available."); var technicalAssistanceParameterSimples = HttpRequestStorage.DatabaseEntities.TechnicalAssistanceParameters .ToList() .Select(x => new TechnicalAssistanceParameterSimple(x)).ToList(); // add blank TAPSes for the years that don't already have stuff in the DB var reportingYearsForUserInputAsIntegers = FirmaDateUtilities.ReportingYearsForUserInputAsIntegers(); var nextTwoYears = new List <int>() { reportingYearsForUserInputAsIntegers.Max() + 1, reportingYearsForUserInputAsIntegers.Max() + 2 }; reportingYearsForUserInputAsIntegers.AddRange(nextTwoYears); technicalAssistanceParameterSimples.AddRange(reportingYearsForUserInputAsIntegers .Where(year => !technicalAssistanceParameterSimples.Select(x => x.Year).ToList().Contains(year)) .Select(year => new TechnicalAssistanceParameterSimple(year))); var viewModel = new TechnicalAssistanceParametersViewModel(technicalAssistanceParameterSimples); return(ViewTechnicalAssistanceParameters(viewModel)); }