コード例 #1
0
        //
        // GET: /ManagingAgencies/Edit/5

        public ActionResult Edit(int id = 0)
        {
            AGENCy agencies = db.AGENCIES.Find(id);

            if (agencies == null)
            {
                return(HttpNotFound());
            }
            return(View(agencies));
        }
コード例 #2
0
 public ActionResult Edit(AGENCy agencies)
 {
     if (ModelState.IsValid)
     {
         db.Entry(agencies).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(agencies));
 }