public ActionResult DeleteConfirmed(int id) { PlayerRecipe playerRecipe = db.PlayerRecipe.Find(id); db.PlayerRecipe.Remove(playerRecipe); db.SaveChanges(); return(RedirectToAction("Index")); }
void Start() { //Fetch the Raycaster from the GameObject (the Canvas) m_Raycaster = GetComponent <GraphicRaycaster>(); //Fetch the Event System from the Scene m_EventSystem = GetComponent <EventSystem>(); _playerRecipe = MainManager.Store.playerRecipe; }
public ActionResult Edit([Bind(Include = "PlayerID,RecipeID")] PlayerRecipe playerRecipe) { if (ModelState.IsValid) { db.Entry(playerRecipe).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.PlayerID = new SelectList(db.Player, "PlayerID", "PlayerName", playerRecipe.PlayerID); ViewBag.RecipeID = new SelectList(db.Recipe, "RecipeID", "RecipeName", playerRecipe.RecipeID); return(View("~/Views/Admin/PlayerRecipes/Edit.cshtml", playerRecipe)); }
// GET: PlayerRecipes/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlayerRecipe playerRecipe = db.PlayerRecipe.Find(id); if (playerRecipe == null) { return(HttpNotFound()); } return(View("~/Views/Admin/PlayerRecipes/Details.cshtml", playerRecipe)); }
// GET: PlayerRecipes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PlayerRecipe playerRecipe = db.PlayerRecipe.Find(id); if (playerRecipe == null) { return(HttpNotFound()); } ViewBag.PlayerID = new SelectList(db.Player, "PlayerID", "PlayerName", playerRecipe.PlayerID); ViewBag.RecipeID = new SelectList(db.Recipe, "RecipeID", "RecipeName", playerRecipe.RecipeID); return(View("~/Views/Admin/PlayerRecipes/Edit.cshtml", playerRecipe)); }