public async Task <IActionResult> Edit(int id, [Bind("Id,Code,Name,IsOfficial")] CurricularGrade curricularGrade)
        {
            if (id != curricularGrade.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(curricularGrade);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CurricularGradeExists(curricularGrade.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(curricularGrade));
        }
        public async Task <IActionResult> Create([Bind("Id,Code,Name,IsOfficial")] CurricularGrade curricularGrade)
        {
            curricularGrade.Subjects = new List <Subject>();
            if (ModelState.IsValid)
            {
                _context.Add(curricularGrade);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(curricularGrade));
        }