public async Task <IActionResult> Edit(int id, [Bind("Id,Name,HasDeleted,DeletedTime")] CaseThick caseThick) { if (id != caseThick.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(caseThick); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CaseThickExists(caseThick.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(caseThick)); }
public async Task <IActionResult> Create([Bind("Id,Name,HasDeleted,DeletedTime")] CaseThick caseThick) { if (ModelState.IsValid) { _context.Add(caseThick); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(caseThick)); }