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