You can safely drop async/await
in GetAllAsync
because the method only returns EF Core’s task (return _context.Users.ToListAsync();
). No code runs afterward and there’s no using
/try
, so you avoid the extra state-machine allocation with identical behavior. Keep async/await
only when you need flow control (e.g., using
, try/catch
, multiple awaits).