title: Returning newly-added record in EFcore
body: <p>I am doing a prototype using EFCore and struggling with a good way to return the object I've just added to a collection on an entity. </p>
  
  <p>For example:</p>
  
  <pre><code>public Songleader AddSongleader(int congregationId, Songleader songleader)
  {
      var congregation = _dbContext.Congregations.Include(c =&gt; c.Songleaders).FirstOrDefault(c =&gt; c.Id == congregationId);
      congregation.Songleaders.Add(songleader);                        
      _dbContext.SaveChanges();
  
      //TODO: return the recently-added record...
      return null;
  }
  </code></pre>
  
  <p>A <code>Congregation</code> has a collection of <code>Songleaders</code>. Once I save the context, though, I'm not sure of a good way to return the new instance. The <code>Id</code> of the Songleader is generated when it's inserted to the DB so I can't just return the object I passed into the method...</p>
  
  <p>Is there a good strategy for this or something baked into EF to help in this scenario?</p>