public void TestProjectionMappingBookTitleAndCount()
        {
            //SETUP
            var genSerConfig = new BookTitleAndCountConfig();
            var mapperConfig = AutoMapperHelpers.CreateReadConfig <Book, BookTitleAndCount>(genSerConfig.AlterReadMapping);

            //ATTEMPT
            var input = DddEfTestData.CreateFourBooks().AsQueryable();
            var list  = input.ProjectTo <BookTitleAndCount>(mapperConfig).ToList();

            //VERIFY
            list.Last().Title.ShouldEqual("Quantum Networking");
            list.Last().ReviewsCount.ShouldEqual(2);
        }
        public void TestDirectMappingBookTitleAndCount()
        {
            //SETUP
            var genSerConfig = new BookTitleAndCountConfig();
            var mapperConfig = AutoMapperHelpers.CreateReadConfig <Book, BookTitleAndCount>(genSerConfig.AlterReadMapping);

            //ATTEMPT
            var input = DddEfTestData.CreateFourBooks().Last();
            var data  = mapperConfig.CreateMapper().Map <BookTitleAndCount>(input);

            //VERIFY
            data.Title.ShouldEqual("Quantum Networking");
            data.ReviewsCount.ShouldEqual(2);
        }