title: Where to set await in delegate action
body: <pre><code>public enum SyncListsEnum
  {
      Country = 1,
      Language = 2
  }
  
  public class SyncListsService
  {
      private readonly WeCandidateContext _db;
      private readonly IRestClientFactory _factory;
      private readonly IConfigurationService _configService;
  
      private readonly Dictionary&lt;SyncListsEnum, Action&lt;IList&lt;ExpandoObject&gt;&gt;&gt; _syncLists;
  
      public SyncListsService(WeCandidateContext db, IRestClientFactory factory, IConfigurationService configService)
      {
          _db = db;
          _factory = factory;
          _configService = configService;
  
          _syncLists = new Dictionary&lt;SyncListsEnum, Action&lt;IList&lt;ExpandoObject&gt;&gt;&gt;()
          {
              {SyncListsEnum.Country, items =&gt;{ new CountrySync(_db).SyncItems(items); _db.SaveChangesAsync();}},
              {SyncListsEnum.Language, items =&gt;{ new LanguageSync(_db).SyncItems(items); _db.SaveChangesAsync();}}
          };
      }
  
      public async Task SyncList(string listName)
      {
          SyncListsEnum list;
          if (!Enum.TryParse(listName, true, out list)) return;
  
  
          // get list content from Recruiter 
          var items = await GetListFromRecruiter();
          // call a specific routine for each list to handle insert/update/delete 
          if (items != null)
          {
              // Synchronizes the local table with items retrieced from Recruiter.
              this._syncLists[list](items);
          }
      }
  }
  </code></pre>
  
  <p>In this code all are correct but i need <code>await _db.SaveChangesAsync()</code> instead of <code>_db.SaveChangesAsync()</code>. If i put <em>await</em> operator in front of <em>_db.SaveChangesAsync()</em>, it shows me an error like <strong>await operator can only be used within an async lamda expression</strong>.</p>
  
  <p>Now where should i use <em>async</em> keyword to resolved this error.</p>