public LocomotiveEditViewModel()
        {
            var listOfManufacturers = new List <SelectListItem>();

            RailwaysManufacturersListOf manService = new RailwaysManufacturersListOf();

            foreach (var tuple in manService.GetListOfManufacturers())
            {
                listOfManufacturers.Add(new SelectListItem()
                {
                    Text = tuple.Item2, Value = tuple.Item1.ToString()
                });
            }

            this.Manufacturer = new SelectList(listOfManufacturers, "Value", "Text");

            /* Locomotive types */

            var listOfLocomotiveTypes = new List <SelectListItem>();

            LocomotiveTypesListOf typeService = new LocomotiveTypesListOf();

            foreach (var tuple in typeService.GetListOfLocomotiveTypes())
            {
                listOfLocomotiveTypes.Add(new SelectListItem()
                {
                    Text = tuple.Item2, Value = tuple.Item1.ToString()
                });
            }

            this.LocoType = new SelectList(listOfLocomotiveTypes, "Value", "Text");
        }
        public static SelectList ManufacturersSelectList()
        {
            var listOfManufacturers = new List <SelectListItem>();

            RailwaysManufacturersListOf manService = new RailwaysManufacturersListOf();

            foreach (var tuple in manService.GetListOfManufacturers())
            {
                listOfManufacturers.Add(new SelectListItem()
                {
                    Text = tuple.Item2, Value = tuple.Item1.ToString()
                });
            }

            var selectList = new SelectList(listOfManufacturers, "Value", "Text");

            return(selectList);
        }