title: Get the result of inserted Entity in Database First approach
body: <p>I mapped the <strong>Insert/Update/Delete</strong> to <strong>StoredProcedure</strong> and tried to insert some entity to database but it seems that the <strong><em>DbContext</em></strong> doesn't update the ID of the inserted Entity so i can get the latest or just inserted data to database.</p>
  
  <p>This is my StoredProcedure mapped to DbSet.Insert </p>
  
  <pre><code>CREATE PROCEDURE [dbo].[sp_tblEM_Currencies_INSERT] 
  @CurrencyID INT,
  @Type NVARCHAR(50),
  @Description NVARCHAR(MAX),
  @Forex Decimal
  AS
  BEGIN
      INSERT INTO 
          tblEM_Currencies (Type, Description, Forex)
      VALUES 
          (@Type, @Description, @Forex)
  
       SELECT SCOPE_IDENTITY() AS CurrencyID  
  END
  </code></pre>
  
  <p>and this is my Insert in DAL</p>
  
  <pre><code>public tblEM_Currencies Insert(tblEM_Currencies entity)
      {
          context.tblEM_Currencies.Add(entity);
  
          return entity;
      }
  </code></pre>
  
  <p>any help would be appreciated.. TIA</p>