The exception explains that there is only one asynchronous operation for each allowed context.
Thus, you should either await them one at a time, as the error message indicates:
var banner = await context.Banners.ToListAsync(); var newsGroup = await context.NewsGroups.ToListAsync();
Or you can use several contexts:
var banner = context1.Banners.ToListAsync(); var newsGroup = context2.NewsGroups.ToListAsync(); await Task.WhenAll(banner, newsGroup);
Stephen Cleary Dec 17 '13 at 13:10 2013-12-17 13:10
source share