예제 #1
0
        public List <CarteDTO> GetAvailableBooks()
        {
            List <Carte> books = bookRepository.GetAvailableBooks();

            foreach (Carte book in books)
            {
                book.Autor = autorRepository.GetObjectById(book.autorId);
                book.Gen   = genderRepository.GetObjectById(book.genId);
            }

            return(CarteTransformer.fromModelListToCarteDtoList(books));
        }
예제 #2
0
 public List <CarteDTO> GetBooksByGen(string gen)
 {
     return(CarteTransformer.fromModelListToCarteDtoList(bookRepository.GetBooksByGen(gen)));
 }
예제 #3
0
 public List <CarteDTO> GetAllBooks()
 {
     return(CarteTransformer.fromModelListToCarteDtoList(bookRepository.getAll().ToList <Carte>()));
 }