Exemple #1
0
        public IList <BookContract> Search(BookTypeContract category, SearchDestinationContract searchBy, string query)
        {
            var type = Mapper.Map <BookTypeEnum>(category);
            IList <BookVersion> bookList;

            switch (searchBy)
            {
            case SearchDestinationContract.Author:
                bookList = m_bookRepository.SearchByAuthorAndBookType(query, type);
                break;

            default:
                bookList = m_bookRepository.SearchByTitleAndBookType(query, type);
                break;
            }
            return(Mapper.Map <IList <BookContract> >(bookList));
        }
 public IList <BookContract> SearchForBook(BookTypeContract category, SearchDestinationContract searchBy, string query)
 {
     return(m_searchManager.Search(category, searchBy, query));
 }