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