var items = await _context.Customers.ToListAsync();
Select allOpen in new window
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent
Open in new window
Basically, await a task wherever you absolutely cannot continue further without the value that the task holds. It doesn't necessarily need to happen on the same line as the async call itself, but in your case it does need to because your mapping code is dependent on that value.