title: Create Id for the related table when new data is added to the current table MVC 5
body: <p>I have an application that needs to be filled in after registration, I have a User and a related Application table.</p>
  <p>I want that after user is registered and the data was added to the User table, new Id was created in the Application table</p>
  <p>User table</p>
  <p><a href="https://i.stack.imgur.com/qcYii.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qcYii.png" alt="enter image description here" /></a></p>
  <p>Application table</p>
  <p><a href="https://i.stack.imgur.com/uFB6R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFB6R.png" alt="enter image description here" /></a></p>
  <p>Here I want new ID to be created automatically when data is added to User table (as it is with selected column)</p>
  <p>The code I used for registration</p>
  <pre><code>public void StudentAdd(T p)
  {
      c.Set&lt;T&gt;().Add(p);
      c.SaveChanges();
  }
  
  registrationRepository.StudentAdd(user);
  </code></pre>
  <p>How can I implement that?
  Thank you in advance</p>