public async Task <IActionResult> Edit(int id, [Bind("TeacherMetodKomissiyaId,TeacherId,MetodKomissiyaId")] TeacherMetodKomissiya teacherMetodKomissiya)
        {
            if (id != teacherMetodKomissiya.TeacherMetodKomissiyaId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(teacherMetodKomissiya);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TeacherMetodKomissiyaExists(teacherMetodKomissiya.TeacherMetodKomissiyaId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MetodKomissiyaId"] = _selectListRepository.GetSelectListMetodKomissiyaNames(teacherMetodKomissiya.MetodKomissiyaId);
            ViewData["TeacherId"]        = _selectListRepository.GetSelectListTeacherFio(teacherMetodKomissiya.TeacherId);
            return(View(teacherMetodKomissiya));
        }
        public async Task <IActionResult> Create([Bind("TeacherMetodKomissiyaId,TeacherId,MetodKomissiyaId")] TeacherMetodKomissiya teacherMetodKomissiya)
        {
            if (ModelState.IsValid)
            {
                _context.Add(teacherMetodKomissiya);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MetodKomissiyaId"] = _selectListRepository.GetSelectListMetodKomissiyaNames(teacherMetodKomissiya.MetodKomissiyaId);
            ViewData["TeacherId"]        = _selectListRepository.GetSelectListTeacherFio(teacherMetodKomissiya.TeacherId);
            return(View(teacherMetodKomissiya));
        }