Beispiel #1
0
        public ActionResult BottleSize()
        {
            var sizes = _bottleSizeRepository.GetAll()
                        .Select(t => new BottleSizeViewModel {
                BottleSizeID = t.BottleSizeID,
                Size         = t.Size
            }).ToList();

            return(View(sizes));
        }
Beispiel #2
0
        public ActionResult Create()
        {
            var model = new WineViewModel();

            model.TypesList      = _typesRepository.GetTypes();
            model.SubTypesList   = _subTypeRepository.GetAll();
            model.BottleSizeList = _bottleSizeRepository.GetAll();
            model.RegionList     = _regionRepository.GetAll();
            model.CountryList    = db.Countries.ToList();

            return(View(model));
        }