public async Task <IActionResult> Edit(int id, [Bind("SobreMimId,Sobre")] SobreMim sobreMim) { if (id != sobreMim.SobreMimId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sobreMim); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SobreMimExists(sobreMim.SobreMimId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sobreMim)); }
public async Task <IActionResult> Create([Bind("SobreMimId,Sobre")] SobreMim sobreMim) { if (ModelState.IsValid) { _context.Add(sobreMim); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sobreMim)); }