コード例 #1
0
 public ActionResult Edit([Bind(Include = "person_id,first_name,last_name,account_type,dob,compress_pass,hash_pass,enc_pass")] people people)
 {
     if (ModelState.IsValid)
     {
         db.Entry(people).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(people));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "genre_id,genre_title")] genres genres)
 {
     if (ModelState.IsValid)
     {
         db.Entry(genres).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(genres));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "id,firstname,lastname")] director director)
 {
     if (ModelState.IsValid)
     {
         db.Entry(director).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(director));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "show_id,show_title,num_seasons,initial_year")] shows shows)
 {
     if (ModelState.IsValid)
     {
         db.Entry(shows).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(shows));
 }
 public ActionResult Edit([Bind(Include = "character_id,character_name,race_id")] characters characters)
 {
     if (ModelState.IsValid)
     {
         db.Entry(characters).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(characters));
 }
コード例 #6
0
 public ActionResult Edit([Bind(Include = "race_id,race_name")] races races)
 {
     if (ModelState.IsValid)
     {
         db.Entry(races).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(races));
 }
 public ActionResult Edit([Bind(Include = "product_id,product_name,product_category,product_price,product_sku,short_description,idx_sku,idx_names,idx_sku_three")] products products)
 {
     if (ModelState.IsValid)
     {
         db.Entry(products).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(products));
 }
 public ActionResult Edit([Bind(Include = "movie_id,movie_title,director,year,genre_id")] movies movies)
 {
     if (ModelState.IsValid)
     {
         db.Entry(movies).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(movies));
 }
コード例 #9
0
 public ActionResult Edit([Bind(Include = "tv_id,tv_title,num_seasons")] tv tv)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tv).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tv));
 }