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