Exemple #1
0
        internal Keep GetById(int id)
        {
            Keep data = _repo.GetById(id);

            if (data == null)
            {
                throw new Exception("Invalid id");
            }
            return(data);
        }
Exemple #2
0
        public ActionResult <Keep> Get(string userId)
        {
            IEnumerable <Keep> found = _kr.GetById(userId);

            if (found == null)
            {
                return(BadRequest());
            }
            return(Ok(found));
        }
Exemple #3
0
 public ActionResult<Keep> Get(int id)
 {
   try
   {
     return Ok(_repo.GetById(id));
   }
   catch (Exception e)
   {
     return BadRequest(e);
   }
 }
Exemple #4
0
        public ActionResult <Keep> Get(int id)
        {
            Keep keep = _repo.GetById(id);

            if (keep != null)
            {
                return(Ok(keep));
            }
            else
            {
                return(NotFound());
            }
        }
 public Keep Get(int id)
 {
     return(db.GetById(id));
 }
 public Keep GetById(int id)
 {
     return _repo.GetById (id);
 }
 public Keep Get(int id)
 {
     return(_repo.GetById(id));
 }
Exemple #8
0
 public Keep GetById(int id)
 {
     return(_kr.GetById(id));
 }