c# - Many nested AggregateExceptions -
working entity framework 7, made simple mistake linq (used skip , forgot include orderby clause). the exception thrown included number of nested aggregate exceptions. the code generates (and catches) exception is: int[] newids; try { newids = await db.products .where(p => p.portalid == portalid) .skip(ids.productids.count) //skip rows read .take(taketotal) //get next block .select(p => p.productid) .toarrayasync(); } catch (aggregateexception ex) { console.writeline(ex.message); newids = new int[] { }; } the code above in repo class called asp.net 5 webapi controller. levels of call using async-await. however aggregate exception got (this dumped immediate window catch block shown above): system.aggregateexception: 1 or more errors occurred. ---> system.aggregateexception: 1 or more errors occurred. ---> system.aggregateexception: 1 or more errors occurred. ---> system.aggregateexception: 1 or mo...