public ServiceCall FindById(int entityId)
 {
     using (var context = _contextCreator())
     {
         _repository = new ConnectedRepository <ServiceCall>(context);
         return(_repository.FindById(entityId));
     }
 }
예제 #2
0
 public Customer FindById(int entityId)
 {
     using (var context = _contextCreator())
     {
         _repository = new ConnectedRepository <Customer>(context);
         return(_repository.FindById(entityId));
     }
 }
예제 #3
0
        // 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));
        }