Esempio n. 1
0
        Book MapToBooktData(CustomerBookDataReponse response)
        {
            var book = new Book();

            book.Id       = response.Id;
            book.Name     = response.Name;
            book.Price    = response.Price;
            book.Category = response.Category;
            book.Author   = response.Author;

            return(book);
        }
        private CustomerBookDataReponse MapToCustomerBooktResponse(Book book)
        {
            var reponse = new CustomerBookDataReponse();

            reponse.Id       = book.Id;
            reponse.Name     = book.Name;
            reponse.Price    = book.Price;
            reponse.Category = book.Category;
            reponse.Author   = book.Author;

            return(reponse);
        }
Esempio n. 3
0
        CustomerCreateOrUpdateBookRequest MapToCustomerRequest(Book newBook)
        {
            var request = new CustomerCreateOrUpdateBookRequest();

            var bookData = new CustomerBookDataReponse();

            bookData.Id       = newBook.Id;
            bookData.Name     = newBook.Name;
            bookData.Price    = newBook.Price;
            bookData.Category = newBook.Category;
            bookData.Author   = newBook.Author;
            request.BookData  = bookData;
            return(request);
        }