public async override void OnNavigatingTo(NavigationParameters parameters) { base.OnNavigatingTo(parameters); NewsArticles = await _newsArticleService.GetNewsArticles(); // NewsArticles = NewsArticles.ToList(); }
public async void OnNavigatedTo(INavigationParameters parameters) { // base.OnNavigatingTo(parameters); NewsArticles = await _newsArticleService.GetNewsArticles(); RSSArticles = await _RSSArticlesService.GetRSSArticles(); }
public async void OnNavigatedTo(INavigationParameters parameters) { // base.OnNavigatingTo(parameters); NewsArticles = await _newsArticlesService.GetNewsArticles(); //Copy of the list OC_NewsArticles = new ObservableCollection <NewsArticles>(NewsArticles); }
public async Task <IActionResult> GetArticles() { List <NewsArticle> newsArticleList = new List <NewsArticle>(); newsArticleList = await _NewsArticlesService.GetNewsArticles(); if (newsArticleList.Count() == 0) { return(NotFound()); } return(Ok(newsArticleList)); }