public async Task <IActionResult> OnPostSil(int id)
        {
            var kitap = await _db.Kitap.FindAsync(id);

            if (kitap == null)
            {
                return(NotFound());
            }
            _db.Kitap.Remove(kitap);
            await _db.SaveChangesAsync();

            return(RedirectToPage("Index"));
        }
        public async Task <IActionResult> OnPost()
        {
            if (ModelState.IsValid)
            {
                await _db.Kitap.AddAsync(Kitap);

                await _db.SaveChangesAsync();

                return(RedirectToPage("Index"));
            }
            else
            {
                return(Page());
            }
        }
        public async Task <IActionResult> OnPost()
        {
            if (ModelState.IsValid)
            {
                var DbGelenKitap = await _db.Kitap.FindAsync(Kitap.Id);

                DbGelenKitap.KitapAd = Kitap.KitapAd;
                DbGelenKitap.Yazar   = Kitap.Yazar;
                DbGelenKitap.ISBN    = Kitap.ISBN;

                await _db.SaveChangesAsync();

                return(RedirectToPage("Index"));
            }

            return(RedirectToPage());
        }