title: Entity Framework Core: ToList() vs ToListAsync()
body: <p>Please consider async GetAccountProperties method in ASP.NET Core Controller:</p>
  
  <pre><code>public class CreditAccountController : Microsoft.AspNetCore.Mvc.Controller
  {
      private readonly ICreditAccountManager _creditAccountManager;
  
      public CreditAccountController(
          ICreditAccountManager creditAccountManager
      {
          _creditAccountManager = creditAccountManager;
      }
  
  
      [HttpGet]
      public async Task&lt;IActionResult&gt; GetAccountProperties(...)
      {
          var result = await _creditAccountManager.GetPropertiesAsync(...);
          if (accountResult.Code == ResponseCode.Success)
              return Ok(result.Value);
          else 
              return NotFound();
      }
  }
  </code></pre>
  
  <p>and following implementations of GetPropertiesAsync() method in CreditAccountManager repository. </p>
  
  <p>First implementation uses .ToList() method:</p>
  
  <pre><code>public Task&lt;Result&lt;List&lt;GeneralAccount&gt;&gt;&gt; GetAccountPropertiesAsync(...)
  {
      var properties = _generalDatabaseContext.AccountProperties.Where(...).ToList();
      result.Code = ResponseCode.Success;
      result.Value = accounts;
      return Task.FromResult(result);
  }
  </code></pre>
  
  <p>The second one uses .ToListAsync() method and nested async/await:</p>
  
  <pre><code>public async Task&lt;Result&lt;List&lt;GeneralAccount&gt;&gt;&gt; GetAccountPropertiesAsync(...)
  {
      var properties = await _generalDatabaseContext.AccountProperties.Where(...).ToListAsync();
      result.Code = ResponseCode.Success;
      result.Value = accounts;
      return result;
  }
  </code></pre>
  
  <p>Considering, that there are no other EF calls in repository method and controller's method is already async, which implementation of repository method is better in terms of performance ? </p>