示例#1
0
 public ActionResult Edit(CopyrightOwner copyrightowner)
 {
     if (ModelState.IsValid)
     {
         db.Entry(copyrightowner).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(copyrightowner));
 }
示例#2
0
        public ActionResult Create(CopyrightOwner copyrightowner)
        {
            if (ModelState.IsValid)
            {
                db.CopyrightOwners.Add(copyrightowner);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(copyrightowner));
        }