public IQueryable<Model.BookCategory> GetAllBooksGroupedByCategory() { BookCategory category = new BookCategory() { CategoryId = "CATE1", CategoryName = "Category 1", Books = new List<Book>() { new Book() { ID = "BOOK1"}, new Book() { ID = "BOOK2"} } }; return new List<BookCategory>() { category }.AsQueryable(); }
public CategoryViewModelBuilder(BookCategory model) { Mapper.CreateMap<BookCategory, CategoryViewModel>(); Mapper.CreateMap<Book, ProductViewModel>(); _model = model; }