Exemple #1
0
        // [Authorize]
        public ActionResult Guncelle(TBLYazar p)
        {
            var yazar4 = dr.TBLYazar.Find(p.ID);

            yazar4.Ad    = p.Ad;
            yazar4.Soyad = p.Soyad;
            yazar4.Detay = p.Detay;
            dr.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public ActionResult YazarEkle(TBLYazar p)
        {
            if (!ModelState.IsValid)
            {
                return(View("YazarEkle"));
            }

            dr.TBLYazar.Add(p);
            dr.SaveChanges();
            return(RedirectToAction("Index"));
        }