public TopRatedPage() { InitializeComponent(); viewModel = new TopRatedViewModel(new MovieService()); BindingContext = viewModel; listView.ItemTapped += ListView_ItemTapped; listView.ItemAppearing += ListView_ItemAppearing; }
public async Task <IActionResult> Index() { var topRatedBars = await this.barService.GetTopRatedBars(); var topRatedCocktails = await this.cocktailService.GetTopRatedCoktails(); var topRatedPage = new TopRatedViewModel(); topRatedPage.TopRatedBars = topRatedBars; topRatedPage.TopRatedCocktails = topRatedCocktails; return(View(topRatedPage)); }
public TopRatedPage(FilmCollection Movies) { this._modelView = new TopRatedViewModel(this.Navigation, Movies._movies); this.BindingContext = this._modelView; InitializeComponent(); }