public async Task <IActionResult> PutAyah(int id, Ayah ayah) { Console.Write("put"); if (id != ayah.AyahId) { return(BadRequest()); } _context.Entry(ayah).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AyahExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTafsir(int id, Tafsir tafsir) { if (id != tafsir.TafsirId) { return(BadRequest()); } _context.Entry(tafsir).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TafsirExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSurah(int id, Surah surah) { if (id != surah.SurahId) { return(BadRequest()); } _context.Entry(surah).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SurahExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }