title: Error: return keyword must not be followed by an object expression in c# async code
body: <p>I have a following async code in C#:</p>
  
  <pre><code>public async Task GetPhotos(List&lt;int&gt; photoIds)
  {
      List&lt;Photos&gt; photos = new List&lt;Photos&gt;();
  
      if (photoIds != null)
      {
          foreach (int photoId in photoIds)
          {
             Photo photo = await ImageRepository.GetAsync(photoId);
  
             if (photo != null)
                photos.Add(photo);
          }
      }
  
      return photos;        
  }
  </code></pre>
  
  <p>On the return statement i am getting the following error message:</p>
  
  <blockquote>
    <p>Since GetPhotos(List photoIds) is an async method that returns 'Task', a return keyword must not be followed by an object expression. Did you intend to return 'Task'?</p>
  </blockquote>
  
  <p>How to solve this error ??</p>