public async Task <IActionResult> Edit(Guid id, [Bind("MyTaskwakeGUID,TaskwakeDetail")] MyTaskwake myTaskwake) { if (id != myTaskwake.MyTaskwakeGUID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(myTaskwake); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MyTaskwakeExists(myTaskwake.MyTaskwakeGUID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(TaskwakeDetail))); } return(View(myTaskwake)); }
public async Task <IActionResult> Create([Bind("MyTaskwakeGUID,TaskwakeDetail")] MyTaskwake myTaskwake) { if (ModelState.IsValid) { myTaskwake.MyTaskwakeGUID = Guid.NewGuid(); _context.Add(myTaskwake); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(TaskwakeDetail))); } return(View(myTaskwake)); }