Ejemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            GalleryFoodVM model = new GalleryFoodVM()
            {
                galleryFoodPhotosList  = db.galleryFoodPhotos.ToList(),
                galleryFoodPhotoSingle = db.galleryFoodPhotos.FirstOrDefault(m => m.Id == id),
                Action = "Edit"
            };

            return(View("Index", model));
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            GalleryFoodVM model = new GalleryFoodVM()
            {
                galleryFoodPhotosList  = db.galleryFoodPhotos.ToList(),
                galleryFoodPhotoSingle = null,
                Action = "Create"
            };

            return(View(model));
        }