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

Details() public method

public Details ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
        public ActionResult Details(int id)
        {
            // Attempt to fetch the desired object
            var fetchedObject = m.GetManufacturerById(id);

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