Be careful with ToListAsync and ToArrayAsync in Entity Framework Core
Entity Framework has two methods for converting a query to a list or an array: ToListAsync
and ToArrayAsync
. Of course there is also the sync version of these methods: ToList
and ToArray
. And sometimes, you should use the latter one!