// // GET: /Pet/Edit/5 public ActionResult Edit(int id = 0) { _logic = new PetLogic(); Pet pet = _logic.GetPetById(id); //Pet pet = db.Pets.Find(id); if (pet == null) { return HttpNotFound(); } ViewBag.CustomerId = new SelectList(db.Customers, "CustomerId", "Username", pet.CustomerId); return View(pet); }
// // GET: /Pet/Delete/5 public ActionResult Delete(int id = 0) { _logic = new PetLogic(); Pet pet = _logic.GetPetById(id); if (pet == null) { return HttpNotFound(); } return View(pet); }