Example #1
0
        // GET: Schedules/Create
        public IActionResult Create()
        {
            IEnumerable <Coach> Coach = _context.Coach.ToList();

            GroupFTennisWebApp.ViewModels.CoachCreate viewModel = new GroupFTennisWebApp.ViewModels.CoachCreate
            {
                Coach = Coach
            };
            return(View(viewModel));
        }
Example #2
0
        // GET: Schedules/Edit/5
        public async Task <IActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var schedule = await _context.Schedule.FindAsync(id);

            if (schedule == null)
            {
                return(NotFound());
            }

            IEnumerable <Coach> Coach = _context.Coach.ToList();

            GroupFTennisWebApp.ViewModels.CoachCreate viewModel = new GroupFTennisWebApp.ViewModels.CoachCreate
            {
                Coach = Coach
            };
            return(View(viewModel));
        }