public async Task <IActionResult> Edit(Guid id, [Bind("Id,Description,timeStamp")] FollowupsLog followupsLog) { if (id != followupsLog.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(followupsLog); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FollowupsLogExists(followupsLog.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(followupsLog)); }
public async Task <IActionResult> Create([Bind("Id,Description,timeStamp")] FollowupsLog followupsLog) { if (ModelState.IsValid) { followupsLog.Id = Guid.NewGuid(); _context.Add(followupsLog); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(followupsLog)); }