public async Task <ActionResult> Index2()
        {
            using (var client = new NewsServiceMVC4Client())
            {
                var timer = new Stopwatch();
                timer.Start();

                var allNews = await Task.WhenAll(
                    client.GetWorldNewsAsync(),
                    client.GetSportNewsAsync(),
                    client.GetFunNewsAsync()
                    );

                IEnumerable <NewsModel> result = new List <NewsModel>();
                result = allNews.Aggregate(result,
                                           (current, news) => current.Concat(news.Convert()));


                var model = new ViewModel {
                    News = result, Elapsed = timer.Elapsed
                };
                timer.Stop();

                return(View("Index", model));
            }
        }
        public async Task <ActionResult> Index()
        {
            using (var client = new NewsServiceMVC4Client())
            {
                var timer = new Stopwatch();
                timer.Start();

                var worldNews = await client.GetWorldNewsAsync();

                var sportNews = await client.GetSportNewsAsync();

                var funNews = await client.GetFunNewsAsync();

                var result = worldNews
                             .Union(sportNews)
                             .Union(funNews)
                             .Convert();

                timer.Stop();

                var model = new ViewModel {
                    News = result, Elapsed = timer.Elapsed
                };

                return(View(model));
            }
        }
        public Task<ViewResult> Index2()
        {
            var client = new NewsServiceMVC4Client();
            var timer = new Stopwatch();
            timer.Start();

            return
                from w in client.GetWorldNewsAsync()
                from s in client.GetSportNewsAsync()
                from f in client.GetFunNewsAsync()
                let all = w.Union(s).Union(f).Convert()
                let filtered = Filter(all)
                select View("Index",
                    new ViewModel
                    { News = filtered, Elapsed = timer.Elapsed });
        }
        public Task <ViewResult> Index2()
        {
            var client = new NewsServiceMVC4Client();
            var timer  = new Stopwatch();

            timer.Start();

            return
                (from w in client.GetWorldNewsAsync()
                 from s in client.GetSportNewsAsync()
                 from f in client.GetFunNewsAsync()
                 let all = w.Union(s).Union(f).Convert()
                           let filtered = Filter(all)
                                          select View("Index",
                                                      new ViewModel
                                                      { News = filtered, Elapsed = timer.Elapsed }));
        }
		public async Task<ActionResult> Index()
		{
			using (var client = new NewsServiceMVC4Client())
			{
				var timer = new Stopwatch();
				timer.Start();

				var worldNews = await client.GetWorldNewsAsync();
				var sportNews = await client.GetSportNewsAsync();
				var funNews = await client.GetFunNewsAsync();

				var result = worldNews
					.Union(sportNews)
					.Union(funNews)
					.Convert();

				timer.Stop();

				var model = new ViewModel {News = result, Elapsed = timer.Elapsed};

				return View(model);
			}
		}
		public async Task<ActionResult> Index2()
		{
			using (var client = new NewsServiceMVC4Client())
			{
				var timer = new Stopwatch();
				timer.Start();

				var allNews = await Task.WhenAll(
					client.GetWorldNewsAsync(),
				  client.GetSportNewsAsync(),
				  client.GetFunNewsAsync()
				);

				IEnumerable<NewsModel> result = new List<NewsModel>();
				result = allNews.Aggregate(result, 
					(current, news) => current.Concat(news.Convert()));


				var model = new ViewModel {News = result, Elapsed = timer.Elapsed};
				timer.Stop();

				return View("Index", model);
			}
		}