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