title: In ASP.NET CORE application EF Core library do not return new inserted record's ID from database?
body: <p>I had asp.net webapi project where below query was working fine
  which is adding data into database and return newly added ID after <code>_context.SaveChanges()</code></p>
  
  <blockquote>
    <p>I'm using MYSQL database. It must have to work in MYSQL too :(</p>
  </blockquote>
  
  <p>but when I migrate <code>asp.net webapi code to asp.net CORE using EF CORE</code> new record inserted into database successfully but after <code>_context.SaveChanges()</code> it returns 0 as newId  instead new Id .</p>
  
  <pre><code>public partial class Student
      {
          public int Id { get; set; }
          public string name { get; set; }
         }
  
  
  Student student = new Student()
  student.name = "test";
  
  _context.Add(student);
  _context.SaveChanges()
  
  int newID = student.Id ; 
  </code></pre>
  
  <p>//got auto generated Id in asp.net webapi but in asp.net core project it is 0.</p>
  
  <p>any clue ?</p>