public Details ( int id ) : System.Web.Mvc.ActionResult | ||
id | int | |
Результат | System.Web.Mvc.ActionResult |
public ActionResult Details(int id)
{
// Attempt to fetch the desired object
var fetchedObject = m.GetVehicleById(id);
if (fetchedObject == null)
{
return RedirectToAction("index");
}
else
{
return View(fetchedObject);
}
}