public IHttpActionResult GetBook(int id) { Book book = service.Fetch(id); if (book == null) { return(NotFound()); } return(Json(book.JsonReady())); }
public Book Fetch(int id) { var book = sql.Fetch(id); if (book != null) { return(book); } else { book = api.Fetch(id); if (book != null) { return(book); } } return(null); }