Ejemplo n.º 1
0
        // GET: ClubPros/Create
        public ActionResult Create(int golfClubId)
        {
            var clubPro = new ClubPro();

            clubPro.GolfClubId = golfClubId;

            var viewModel = new GolfClubProViewModel();

            viewModel.ClubPro = clubPro;
            var club = db.GolfClubs.Find(clubPro.GolfClubId);

            viewModel.Club = club;

            return(View(viewModel));
        }
Ejemplo n.º 2
0
        // GET: ClubPros/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ClubPro clubPro = db.ClubProes.Find(id);

            if (clubPro == null)
            {
                return(HttpNotFound());
            }
            var viewModel = new GolfClubProViewModel();

            viewModel.ClubPro = clubPro;
            var club = db.GolfClubs.Find(clubPro.GolfClubId);

            viewModel.Club = club;

            return(View(viewModel));
        }