AssocOneToMany.Controllers.TeamsController.DetailsWithPlayers C# (CSharp) Method

DetailsWithPlayers() public method

public DetailsWithPlayers ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
        public ActionResult DetailsWithPlayers(int? id)
        {
            // Attempt to get the matching object
            var o = m.TeamGetByIdWithPlayers(id.GetValueOrDefault());

            if (o == null)
            {
                return HttpNotFound();
            }
            else
            {
                // Pass the object to the view
                return View(o);
            }
        }