public async Task <IActionResult> Edit(int id, [Bind("Id,Title,Description,IsDeleted,TimeDeleted")] ChooseEduHome chooseEduHome) { if (id != chooseEduHome.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(chooseEduHome); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChooseEduHomeExists(chooseEduHome.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(chooseEduHome)); }
public async Task <IActionResult> Create([Bind("Id,Title,Description,IsDeleted,TimeDeleted")] ChooseEduHome chooseEduHome) { if (ModelState.IsValid) { _context.Add(chooseEduHome); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(chooseEduHome)); }