Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("ExperienciaId,Nome,Descricao,Data_Inicio,Data_Fim")] Experiencia experiencia)
        {
            if (id != experiencia.ExperienciaId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(experiencia);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExperienciaExists(experiencia.ExperienciaId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(experiencia));
        }
Пример #2
0
        public async Task <IActionResult> Edit(int id, [Bind("LinguasId,Lingua,Coral,Leitura,Poral,Ioral,Escrita")] Linguas linguas)
        {
            if (id != linguas.LinguasId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(linguas);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!LinguasExists(linguas.LinguasId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(linguas));
        }