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)); }
public List <CarteDTO> GetBooksByGen(string gen) { return(CarteTransformer.fromModelListToCarteDtoList(bookRepository.GetBooksByGen(gen))); }
public List <CarteDTO> GetAllBooks() { return(CarteTransformer.fromModelListToCarteDtoList(bookRepository.getAll().ToList <Carte>())); }