예제 #1
0
        public IActionResult GetById(int id)
        {
            var patron = _patronRepository.FindByID(id);

            if (patron == null)
            {
                return(Ok("Patron doesn't exist!"));
            }
            return(Ok(patron));
        }
예제 #2
0
        public IActionResult GetById(long idPatron)
        {
            var item = patronRepository.FindByID(idPatron);

            if (item == null)
            {
                return(NotFound("Patron with id : " + idPatron + " is not present. Enter valid patron id."));
            }
            return(Ok(item));
        }