コード例 #1
0
        public ActionResult UpdateParent(Food food)
        {
            food.ParentId = 0;
            food.Consist  = "";

            _context.Entry(food).State = EntityState.Modified;
            _context.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Update(Comfort comfort)
 {
     _context.Entry(comfort).State = EntityState.Modified;
     _context.SaveChanges();
     return(RedirectToAction("Index"));
 }
コード例 #3
0
 public ActionResult Update(News news)
 {
     _context.Entry(news).State = EntityState.Modified;
     _context.SaveChanges();
     return(RedirectToAction("Index"));
 }