Esempio n. 1
0
        public ActionResult Edit(int id)
        {
            ViewBag.Countries = DbHelpers.GetCountriesToList();
            Place place = db.Place.Include(c => c.Country).Include(c => c.Coordinates).Where(p => p.ID == id).SingleOrDefault();

            return(View(place));
        }
        public ActionResult Edit(int id)
        {
            ViewBag.AttractionTypes = DbHelpers.GetAttractionTypesToList();
            ViewBag.Countries       = DbHelpers.GetCountriesToList();
            Attraction attraction = db.Attraction.Include(c => c.Country).Include(t => t.AttractionType).Include(c => c.Coordinates).Include(a => a.Address).Include(i => i.Images).Where(a => a.ID == id).SingleOrDefault();
            AttractionEditViewModel attractionEdit = new AttractionEditViewModel();

            attractionEdit.Attraction = attraction;
            return(View(attractionEdit));
        }
Esempio n. 3
0
 public ActionResult Create()
 {
     ViewBag.Countries = DbHelpers.GetCountriesToList();
     return(View());
 }