Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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());
        }
Exemplo n.º 3
0
        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());
        }