title: EF Core Repository items not tracked after insert with ExecuteSqlRaw(commandText)
body: <p>Because of the performance benefits, I am inserting data by executing raw sql command.
  All data are properly inserted into database, but the repository is not aware of them being inserted. Basically, <strong>usersBeforeInsert</strong> and <strong>usersAfterInsert</strong> contain the same 3 records.</p>
  <p>Also, after application restart, repository is still not aware of users inserted with ExecuteSqlRaw(), retrieving only users that existed prior to ExecuteSqlRaw().</p>
  <p>Does anybody knows how to make _userRepository retrieve all data from db? Btw, I am using asp.net boilerplate project.</p>
  <p>Here is the code sample:</p>
  <pre><code>var usersBeforeInsert = await _userRepository.GetAllListAsync();      // 3
  var commandText = GenerateInsertUsersSqlScript(users);
  var context = _userRepository.GetDbContext();
  var rowsAffected = context.Database.ExecuteSqlRaw(commandText);       // 85000
  context.SaveChange()
  var usersAfterInsert = await _userRepository.GetAllListAsync();      // 3
  </code></pre>