Multi tasking Ask Question
Step 1
private void ParseRss(NewsCategory categoryItem)
{
// get rss link
}
Step 2
upadate rss using task.wait all
public void PorcessNews()
{
var newsCategoryList = _storedb.NewsCategories.ToList();
Task.WaitAll((from product in newsCategoryList
select Task.Run(() => ParseRss(product))).ToArray());
// PriceMatchLogger.Debug("NewsParser.Parse: News parsing complete");
_storedb.SaveChanges();
}
Enter an email address to invite a colleague or co-author to join you on socimo. They will receive an email and, in some cases, up to two reminders.