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