private DisplayCarBrandModel GetSelectedCarBrand(CarsRepository repository, string carBrandName) { var carBrandsList = repository.GetCarBrands(); var selectedCarBrand = carBrandsList.Where(e => e.Name == carBrandName).FirstOrDefault(); return(selectedCarBrand); }