示例#1
0
        public void PopulateModelList(ICarRepo repo)
        {
            foreach (var model in repo.GetAllModels())
            {
                var addModel = new SelectListItem
                {
                    Value = model.ModelId.ToString(),
                    Text  = model.ModelType,
                };

                MakeList.Add(addModel);
            }
        }
示例#2
0
        public List <CarModel> GetModels()
        {
            var toReturn = repo.GetAllModels();

            return(toReturn);
        }