public List <VehicleType> LoadTypes()
        {
            var csvStrings  = CsvDeseriallizerService.GetCsvStringsFromFile(VehicleTypeFilePath);
            var listOfTypes = new List <VehicleType>();

            foreach (var csvString in csvStrings)
            {
                listOfTypes.Add(CsvDeseriallizerService.CreateType(csvString));
            }

            return(listOfTypes);
        }
        public List <Vehicle> LoadVehicles(IEnumerable <Rent> rents, IEnumerable <VehicleType> types)
        {
            var csvStrings     = CsvDeseriallizerService.GetCsvStringsFromFile(VehicleFilePath);
            var listOfVehicles = new List <Vehicle>();

            foreach (var csvString in csvStrings)
            {
                listOfVehicles.Add(CsvDeseriallizerService.CreateVehicle(csvString, rents, types));
            }

            return(listOfVehicles);
        }
        public List <Rent> LoadRents()
        {
            var csvStrings  = CsvDeseriallizerService.GetCsvStringsFromFile(RentFilePath);
            var listOfRents = new List <Rent>();

            foreach (var csvString in csvStrings)
            {
                listOfRents.Add(CsvDeseriallizerService.CreateRent(csvString));
            }

            return(listOfRents);
        }
        /// <summary>
        /// Run controller
        /// </summary>
        public void RunController()
        {
            var parsedStrings = CsvDeseriallizerService.GetCsvStringsFromFile(_filePath);
            var listOfOrders  = new List <string>();

            foreach (var csvString in parsedStrings)
            {
                listOfOrders.AddRange(CsvDeseriallizerService.DeserializeOrders(csvString));
            }

            foreach (var order in listOfOrders)
            {
                if (_orders.ContainsKey(order))
                {
                    _orders[order]++;
                }
                else
                {
                    _orders.Add(order, 1);
                }
            }

            PrintOrders();
        }