public IActionResult Get(int id)
        {
            Books book = _BookService.FindById(id);

            if (book == null)
            {
                return(NotFound());
            }
            return(Ok(book));
        }
        public IActionResult Get(long id)
        {
            var person = _bookBusiness.FindById(id);

            if (person == null)
            {
                return(NotFound());
            }

            return(Ok(person));
        }
示例#3
0
        public IActionResult Get(string id)
        {
            var person = _booksRepository.FindById(id);

            if (person != null)
            {
                return(Ok(person));
            }
            else
            {
                return(BadRequest("Id not found"));
            }
        }
示例#4
0
        public IActionResult Get(long id)
        {
            var books = _booksbusiness.FindById(id);

            if (books == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(books));
            }
            //return Ok();
        }