public async Task <IActionResult> Edit(Guid id, [Bind("Id,Name,Description")] Poi poi) { if (id != poi.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(poi); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PoiExists(poi.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(poi)); }
public void Update(Poi poi) { _context.Update(poi); _context.SaveChanges(); }