using LibraryDTO; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DtoAbstractLayer { /// /// abstract layer for requests on Books Library /// public interface IDtoManager { /// /// get a book by specifying its id /// /// id of the Book to get /// a Book with this id (or null if id is unknown) Task GetBookById(string id); /// /// get a book by specifying its isbn /// /// isbn of the Book to get /// a Book with this isbn (or null if isbn is unknown) Task GetBookByISBN(string isbn); /// /// get books containing a substring in their titles /// /// the substring to look for in book titles /// index of the page of resulting books /// number of resulting books per page /// sort criterium (not mandatory): /// /// /// max count books Task>> GetBooksByTitle(string title, int index, int count, string sort = ""); /// /// get books of a particular author by giving the author id /// /// the id of the author /// index of the page of resulting books /// number of resulting books per page /// sort criterium (not mandatory): ///
    ///
  • ```title```: sort books by titles in alphabetical order,
  • ///
  • ```title_reverse```: sort books by titles in reverse alphabetical order,
  • ///
  • ```new```: sort books by publishing dates, beginning with the most recents,
  • ///
  • ```old```: sort books by publishing dates, beginning with the oldest
  • ///
/// /// max count books Task>> GetBooksByAuthorId(string authorId, int index, int count, string sort = ""); /// /// get books of authors whose name (or alternate names) contains a particular substring /// /// name to look for in author names or alternate names /// index of the page of resulting books /// number of resulting books per page /// sort criterium (not mandatory): ///
    ///
  • ```title```: sort books by titles in alphabetical order,
  • ///
  • ```title_reverse```: sort books by titles in reverse alphabetical order,
  • ///
  • ```new```: sort books by publishing dates, beginning with the most recents,
  • ///
  • ```old```: sort books by publishing dates, beginning with the oldest
  • ///
/// /// max count books Task>> GetBooksByAuthor(string author, int index, int count, string sort = ""); /// /// get an author by specifying its id /// /// id of the Author to get /// an author with this id (or null if id is unknown) Task GetAuthorById(string id); /// /// get authors containing a substring in their names (or alternate names) /// /// the substring to look for in author names (or alternate names) /// index of the page of resulting authors /// number of resulting authors per page /// sort criterium (not mandatory): ///
    ///
  • ```name```: sort authors by names in alphabetical order,
  • ///
  • ```name_reverse```: sort authors by names in reverse alphabetical order,
  • ///
/// /// max count authors Task>> GetAuthorsByName(string substring, int index, int count, string sort = ""); } }