Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "ID,Title,Description,VideoLink,tags,isApproved")] Video video)
 {
     if (ModelState.IsValid)
     {
         db.Entry(video).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(video));
 }
Exemplo n.º 2
0
 public ActionResult Edit(User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "ID,ComicName,Company,Year")] Comic comic)
 {
     if (ModelState.IsValid)
     {
         db.Entry(comic).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(comic));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "ID,GameName,Year,Platform,Approved")] Game game)
 {
     if (ModelState.IsValid)
     {
         db.Entry(game).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(game));
 }
        public bool Update(Message entity)
        {
            try
            {
                _context.Entry(entity).State = EntityState.Modified;
                _context.SaveChangesAsync();

                return(true);
            }
            catch
            {
                return(false);
            }
        }