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

            return View(thumbnail);
        }
Exemplo n.º 2
0
 public ScaledImage(Thumbnail thumbNail, GalleryImage baseImage)
 {
     BaseImage = baseImage;
     Thumbnail = thumbNail;
 }
Exemplo 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);
 }