Esempio n. 1
0
        public Borrowing FindBorrowing(string isbn, string cardId)
        {
            XmlBorrowing xmlBorrowing = _findXmlBorrowing(isbn, cardId);

            XmlBook xmlBook = _findXmlBook(isbn);

            XmlReader xmlReader = _findXmlReader(cardId);

            return(_assembler.toBorrowing(xmlBorrowing, xmlBook, xmlReader));
        }
        public XmlBook toXmlBook(Book book)
        {
            XmlBook xml = new XmlBook
            {
                Isbn   = book.Isbn,
                Title  = book.Title,
                Author = book.Author
            };

            return(xml);
        }
 public Borrowing toBorrowing(XmlBorrowing xmlBorrowing, XmlBook xmlBook, XmlReader xmlReader)
 {
     return(_create.Borrowing(toReader(xmlReader), toBook(xmlBook), xmlBorrowing.StartDate, xmlBorrowing.BorrowingDuration));
 }
 public Book toBook(XmlBook xml)
 {
     return(_create.Book(xml.Isbn, xml.Author, xml.Title));
 }