public ActionResult Detay(int id, IlModel model) { Il il = manager.Bul(id); model.Il = il; return(View(model)); }
public ActionResult Guncelle(int id) { IlModel model = new IlModel(); model.Il = manager.Bul(id); return(View(model)); }
public ActionResult Il() { IlModel model = new IlModel(); model.list = manager.Liste(); return(View(model)); }
public ActionResult Guncelle(int id, IlModel model) { Il il = manager.Bul(id); il.IlAd = model.il.IlAd; manager.Guncelle(il); manager.Save(); return(RedirectToAction("Il")); }
public ActionResult Ekle(IlModel model) { Il il = new Il(); il.IlAd = model.il.IlAd; manager.Ekle(il); manager.Save(); return(RedirectToAction("Il")); }
public IActionResult IlCreate(IlModel il) { var entity = new Il() { adi = il.adi, }; _ilService.Create(entity); return(Redirect("/admin/il/list")); }
public IActionResult IlEdit(IlModel ilModel) { var entity = _ilService.GetById(ilModel.ilId); if (entity == null) { return(NotFound()); } entity.adi = ilModel.adi; _ilService.Update(entity); return(Redirect("/admin/il/list")); }
public IActionResult IlEdit(int?id) { if (id == null) { return(NotFound()); } var entity = _ilService.GetByIdWithIlanlar((int)id); if (entity == null) { return(NotFound()); } var model = new IlModel() { ilId = entity.ilId, adi = entity.adi, Ilanlar = entity.Ilanlar.ToList() }; return(View(model)); }