public async Task <IActionResult> Edit(int id, [Bind("ID,Title,url")] TtsPdfMessages ttsPdfMessages) { if (id != ttsPdfMessages.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(ttsPdfMessages); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TtsPdfMessagesExists(ttsPdfMessages.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(ttsPdfMessages)); }
public async Task <IActionResult> Create([Bind("ID,Title,url")] TtsPdfMessages ttsPdfMessages) { if (ModelState.IsValid) { _context.Add(ttsPdfMessages); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(ttsPdfMessages)); }