title: Get Last Inserted record Id Entity Framework
body: <p>I am inserting records in database using stored procedures like below</p>
  
  <pre><code>db.Database.ExecuteSqlCommand("sp_insertNewRecord");
  </code></pre>
  
  <p>Now I want to get the Id of last inserted record.</p>
  
  <p>Due to some reason I can't use below function </p>
  
  <pre><code>db.TableName.Add(record);
  db.SaveChanges();
  </code></pre>
  
  <p>So please don't suggest me to use this.</p>