public void Delete(int entityId) { using (var context = _contextCreator()) { _repository = new ConnectedRepository <ServiceAddress>(context); _repository.Delete(entityId); } }
public void Delete(int entityId) { using (var context = _contextCreator()) { _repository = new ConnectedRepository <Customer>(context); _repository.Delete(entityId); } }
public ActionResult DeleteConfirmed(int id) { _repository.Delete(id); //ChlorineLevel chlorineLevel = db.ChlorineLevelSet.Find(id); //db.ChlorineLevelSet.Remove(chlorineLevel); //db.SaveChanges(); return(RedirectToAction("Index")); }