public ActionResult Edit(Region region) { if (ModelState.IsValid) { db.Entry(region).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(region)); }
public ActionResult Edit([Bind(Include = "MonsterId,Name,Atk,Def,Spd,Hp")] Monster monster) { if (ModelState.IsValid) { db.Entry(monster).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(monster)); }
public ActionResult Edit([Bind(Include = "WeaponId,Name,Atk,Def,Spd")] Weapon weapon) { if (ModelState.IsValid) { db.Entry(weapon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(weapon)); }
public ActionResult Edit([Bind(Include = "RaceId,Name,AtkMod,DefMod,SpdMod")] Race race) { if (ModelState.IsValid) { db.Entry(race).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(race)); }
public ActionResult Edit(NPC NPC) { if (ModelState.IsValid) { db.Entry(NPC).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RegionId = new SelectList(db.Regions, "RegionID", "RegionName", NPC.RegionID); return(View(NPC)); }
public ActionResult Edit(Reward reward) { if (ModelState.IsValid) { db.Entry(reward).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.RegionId = new SelectList(db.Regions, "RegionID", "RegionName", reward.RegionID); ViewBag.NPCId = new SelectList(db.NPCs, "NPCID", "NPCName", reward.NPCID); return(View(reward)); }
public ActionResult Edit([Bind(Include = "PersonagemId,Name,Atk,Def,Spd,Hp,RaceID,ArmorID,WeaponID,EquipID")] Character character) { if (ModelState.IsValid) { db.Entry(character).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ArmorID = new SelectList(db.Armors, "ArmorId", "Name", character.ArmorID); ViewBag.EquipID = new SelectList(db.Equips, "EquipId", "Name", character.EquipID); ViewBag.RaceID = new SelectList(db.Races, "RaceId", "Name", character.RaceID); ViewBag.WeaponID = new SelectList(db.Weapons, "WeaponId", "Name", character.WeaponID); return(View(character)); }
public IActionResult Edit(Character character) { db.Entry(character).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Edit(Inventory inventory) { db.Entry(inventory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }