internal Keep GetById(int id) { Keep data = _repo.GetById(id); if (data == null) { throw new Exception("Invalid id"); } return(data); }
public ActionResult <Keep> Get(string userId) { IEnumerable <Keep> found = _kr.GetById(userId); if (found == null) { return(BadRequest()); } return(Ok(found)); }
public ActionResult<Keep> Get(int id) { try { return Ok(_repo.GetById(id)); } catch (Exception e) { return BadRequest(e); } }
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)); }
public Keep GetById(int id) { return(_kr.GetById(id)); }