title: sqlexception cannot insert duplicate key row
body: <p>Tried to alter my SQL statement to change the format of how user names are create. I am creating dummy data for testing on a webpage so I just need multiple users. I want to change the name for the user currently it is <code>student{integer}@email.com</code> and I wanted to change name to <code>student{integer}</code></p>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p><strong>SqlException</strong>: Cannot insert duplicate key row in object 'dbo.Users' with unique index 'UX_Users'. The duplicate key value is (1, student0@email.com).
    The statement has been terminated.</p>
  </blockquote>
  
  <p><strong>SQL statement</strong></p>
  
  <pre><code>string basestring = "student{0}@email.com";
  string userName = "Student{0}";
  
  using (Database dc = new Database())
  {
      dc.Connection.Open();
      for (int i = 0; i &lt; 400; i++)
      {
          string email = string.Format(basestring,i);
          string sName = string.Format(userName, i);
          User u = new User(){ Name = sName, UserName = email, InstitutionUniqueID = email, Email = email, CreationDate=DateTime.Now, InstitutionsID=1, GUID= Guid.NewGuid() };
          dc.Users.InsertOnSubmit(u); 
      }
      dc.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
  }
  </code></pre>
  
  <p>This is where I am getting the error: </p>
  
  <pre><code>dc.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict);
  </code></pre>
  
  <p>I am using linqpad to test this out. </p>