public async Task <IActionResult> Index() { var books = await _bookCatalog.GetBooks(); // TODO Hier die anderen Services ansprechen var bookCatalogVm = BuildBookCatalogVm(books); return(View(bookCatalogVm)); }
public async Task <IActionResult> Index() { var books = await _bookCatalog.GetBooks(); // TODO: Aus Performance gründen könnten diese zwei Requests parallel laufen var prices = await _priceService.GetPricesForBooks(books); var ratings = await _ratingService.GetRatingsForBooks(books); var bookCatalogVm = BuildBookCatalogVm(books, prices, ratings); return(View(bookCatalogVm)); }