public ServiceCall FindById(int entityId) { using (var context = _contextCreator()) { _repository = new ConnectedRepository <ServiceCall>(context); return(_repository.FindById(entityId)); } }
public Customer FindById(int entityId) { using (var context = _contextCreator()) { _repository = new ConnectedRepository <Customer>(context); return(_repository.FindById(entityId)); } }
// GET: ChlorineLevels/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ChlorineLevel chlorineLevel = _repository.FindById(id.Value); //ChlorineLevel chlorineLevel = db.ChlorineLevelSet.Find(id); if (chlorineLevel == null) { return(HttpNotFound()); } return(View(chlorineLevel)); }