public IHttpActionResult GetBookByID(int id) { Book Book = BookData.GetBook(id); //En caso de no encontrar un libro con dicho id, retorna un BadRequest if (Book == null) { return(BadRequest()); } return(Ok(Book)); }
public WCFBook GetBook(string id) { Book b = BookData.GetBook(Int32.Parse(id)); return(WCFBook.Make(b.BookID.ToString(), b.Title, b.ISBN, b.Author, b.Stock, b.Price)); }
public List <Book> GetBook() { return(bookData.GetBook()); }