public ActionResult GezilecekYerEkle(VisitingPlaces visitingPlaces) { _db.VisitingPlaces.Add(visitingPlaces); try { int result = _db.SaveChanges(); //result içinde etkilenen satır sayısı tutulur if (result > 0) { return(RedirectToAction("Index")); } else { throw new Exception(); } } catch (Exception) { ViewBag.IsSuccess = false; return(View()); } }
public void Update(VisitingPlaces entity) { _visitingplacesDAL.Update(entity); }
public void Insert(VisitingPlaces entity) { _visitingplacesDAL.Add(entity); }
public void Delete(VisitingPlaces entity) { _visitingplacesDAL.Remove(entity); }