title: GetRolesForUser tries to get Roles on old username?
body: <p>I have a section on a page where a user can change their username.  This is basically the code for that:</p>
  
  <pre><code>user.UserName = txtNewUserName.Text;
  user.Save();
  </code></pre>
  
  <p>user is a class in my dbml and Save calls SubmitChanges on the data context.</p>
  
  <p>The name is changed in the database, so when it calls the following method, it fails because it is trying to get the user with the old username instead of the one that is in the database now.</p>
  
  <pre><code>public override string[] GetRolesForUser(string username)
  {
      return dc.Users.Where(u =&gt; u.UserName== username)
                     .SingleOrDefault().Roles
                     .Select(r =&gt; r.RoleName).ToArray&lt;string&gt;();
  }
  </code></pre>