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));
        }
Example #3
0
        public IActionResult Get(string id)
        {
            var person = _booksRepository.FindById(id);

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

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