private void CreateMsd1List(Dictionary <string, string> filterDictionary, MSDData msdDataFor)
        {
            if (_msd1Queryable == null)
            {
                _msd1Queryable = _context.Msd1Data.AsQueryable();
            }

            if (_msd3Queryable == null)
            {
                _msd3Queryable = _context.Msd3.Include(m => m.Msd3agents).AsQueryable();
            }

            foreach (var(key, value) in filterDictionary)
            {
                switch (msdDataFor)
                {
                case MSDData.MSD1:
                    FilterMsd1Data(key, value);
                    break;

                case MSDData.MSD2:
                    FilterMsd2Data(key, value);
                    break;

                case MSDData.MSD3:
                    FilterMsd3Data(key, value);
                    break;
                }
            }
        }
        private void FilterByStatisticalPort(string statisticalPort, MSDData msdDataFor)
        {
            var portList = _context.GlobalPort.Where(x => x.StatisticalPort == statisticalPort).Select(p => p.Locode);

            switch (msdDataFor)
            {
            case MSDData.MSD1:
                _msd1Queryable = _msd1Queryable.Where(x => portList.Contains(x.ReportingPort));
                break;

            case MSDData.MSD2:
                _msd2Queryable = _msd2Queryable.Where(x => portList.Contains(x.ReportingPort));
                break;

            case MSDData.MSD3:
                _msd3Queryable = _msd3Queryable.Where(x => portList.Contains(x.ReportingPort));
                break;
            }
        }