AutoMapperIntro.Controllers.ManufacturersController.Edit C# (CSharp) Method

Edit() public method

public Edit ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
        public ActionResult Edit(int id)
        {
            // Attempt to get the object with the matching identifier
            ManufacturerBase fetchedObject = m.GetManufacturerById(id);

            if (fetchedObject == null)
            {
                return RedirectToAction("index");
            }
            else
            {
                return View(fetchedObject);
            }
        }

Same methods

ManufacturersController::Edit ( int id, ManufacturerBase newItem ) : System.Web.Mvc.ActionResult