// GET: Ninjas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var ninja = _repo.GetNinjaWithEquipment(id.Value); if (ninja == null) { return(HttpNotFound()); } ViewBag.ClanId = new SelectList(_repo.GetClanList(), "Id", "ClanName", ninja.ClanId); return(View(ninja)); }