コード例 #1
0
        internal Keep GetById(int id)
        {
            Keep data = _repo.GetById(id);

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

            if (found == null)
            {
                return(BadRequest());
            }
            return(Ok(found));
        }
コード例 #3
0
ファイル: KeepsController.cs プロジェクト: KyleJTodd/keepr
 public ActionResult<Keep> Get(int id)
 {
   try
   {
     return Ok(_repo.GetById(id));
   }
   catch (Exception e)
   {
     return BadRequest(e);
   }
 }
コード例 #4
0
        public ActionResult <Keep> Get(int id)
        {
            Keep keep = _repo.GetById(id);

            if (keep != null)
            {
                return(Ok(keep));
            }
            else
            {
                return(NotFound());
            }
        }
コード例 #5
0
 public Keep Get(int id)
 {
     return(db.GetById(id));
 }
コード例 #6
0
 public Keep GetById(int id)
 {
     return _repo.GetById (id);
 }
コード例 #7
0
 public Keep Get(int id)
 {
     return(_repo.GetById(id));
 }
コード例 #8
0
 public Keep GetById(int id)
 {
     return(_kr.GetById(id));
 }