title: Is it possible to refresh the data after insert?
body: <p>I work with EF / AutoMapping. And I want after an Insert immediately the Id (PK) of the record.
  How do you do that? Is it possible refreshing the data immediately after an insert?</p>
  <pre class="lang-cs prettyprint-override"><code>public int InsertArtist(ArtistDto artistDto)
  {
      Artist entity = _mapper.Map&lt;ArtistDto, Artist&gt;(artistDto);
  
      _artistRepository.Insert(entity);
      _artistRepository.Save();
  
      return entity.Id;
  }
  </code></pre>