예제 #1
0
        public JsonResult SehirEkle(string sehirAdi)
        {
            Sehir yeniSehir = new Sehir()
            {
                SehirId  = Guid.NewGuid(),
                SehirAdi = sehirAdi,
                AktifMi  = true,
            };

            _sehirDAL.Add(yeniSehir);

            return(Json(new { yeniSehir.SehirId, yeniSehir.SehirAdi }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public void Insert(Sehir entity)
 {
     _sehirDAL.Add(entity);
 }