title: How to call nested Async method
body: <p>I want to know what is best way to call nested async methods, if I want both methods to be async. <br />
  <strong>First:</strong> Caller method must just return <code>Task</code> <br /></p>
  
  <pre><code>public async Task SaveChangesAsync()
  {
      await Context.SaveChangesAsync();
  }
  public Task UpdateAsync(List&lt;TEntity&gt; entities)
  {
      foreach (TEntity entity in entities)
      {
          BeforeUpdate(entity);
          Context.Entry(entity).State = EntityState.Modified;
      }
      return SaveChangesAsync();
  }
  </code></pre>
  
  <p><br/></p>
  
  <p><strong>Second:</strong> Caller method must have an async-<code>await</code> as called method <br /></p>
  
  <pre><code>public async Task SaveChangesAsync()
  {
      await Context.SaveChangesAsync();
  }
  public async Task UpdateAsync(List&lt;TEntity&gt; entities)
  {
      foreach (TEntity entity in entities)
      {
          BeforeUpdate(entity);
          Context.Entry(entity).State = EntityState.Modified;
      }
      await SaveChangesAsync();
  }
  </code></pre>