示例#1
0
        public IActionResult GetById(int id)
        {
            var library = _libraryRepository.FindByID(id);

            if (library == null)
            {
                return(Ok("Library doesn't exist!"));
            }
            return(Ok(library));
        }
示例#2
0
        public IActionResult GetById(long idLibrary)
        {
            var item = libraryRepository.FindByID(idLibrary);

            if (item == null)
            {
                return(NotFound("Library with id : " + item.libraryid + " is not present. Enter valid library id."));
            }
            return(Ok(item));
        }