public ActionResult Create(Thumbnail thumbnail)
        {
            if (ModelState.IsValid)
            {
                db.Thumbnails.Add(thumbnail);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(thumbnail);
        }
Esempio n. 2
0
 public ScaledImage(Thumbnail thumbNail, GalleryImage baseImage)
 {
     BaseImage = baseImage;
     Thumbnail = thumbNail;
 }
Esempio n. 3
0
 public ScaledImage(Thumbnail thumbNail, GalleryImage baseImage)
 {
     BaseImage = baseImage;
     Thumbnail = thumbNail;
 }
 public ActionResult Edit(Thumbnail thumbnail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(thumbnail).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(thumbnail);
 }