title: Get an Id from EF query then use that to remove records
body: <p>Using EF I would like to remove a user from the Dot database...this all works fine with code like </p>
  
  <pre><code>DbContext.ExecuteStoreCommand("DELETE FROM activeforums_Attachments where UserId = " + userId);
  DbContext.ExecuteStoreCommand("DELETE FROM activeforums_Forums_Tracking where UserId = " + userId);
  DbContext.ExecuteStoreCommand("DELETE FROM activeforums_Poll where UserId = " + userId);
  DbContext.ExecuteStoreCommand("DELETE FROM activeforums_Poll_Results where UserId = " + userId);
  </code></pre>
  
  <p>I can remove manually using the aspNetUserId with:</p>
  
  <pre><code> string aspNetUserId = "'21F72BCA-A51P-47DF-B57A-C31A191C61D2'";
      DbContext.ExecuteStoreCommand("DELETE FROM aspnet_Membership where UserId = " + aspNetUserId);
      DbContext.ExecuteStoreCommand("DELETE FROM aspnet_UsersInRoles where UserId = " + aspNetUserId);
      DbContext.ExecuteStoreCommand("DELETE FROM aspnet_Users where UserId = " + aspNetUserId);
  </code></pre>
  
  <p>and this works...so now all I need to do is get each individual aspNetUserId from the userName...so i'm trying something like </p>
  
  <pre><code>using (DEntities DbContext = DAOHelper.GetObjectContext&lt;DEntities&gt;())
  {
  var userIdToRemove = DbContext.ExecuteStoreCommand("Select FROM aspnet_Membership where UserName = " + userName);
  DbContext.ExecuteStoreCommand("DELETE FROM aspnet_Membership where UserId = " + userIdToRemove.UserId);
  DbContext.ExecuteStoreCommand("DELETE FROM aspnet_UsersInRoles where UserId = " + userIdToRemove.UserId);
  DbContext.ExecuteStoreCommand("DELETE FROM aspnet_Users where UserId = " + userIdToRemove.UserId);
  </code></pre>
  
  <p>Is something like this possible? setting a var when using EF and if not has anyone else any ideas on how to resolve this...thanks for any replies</p>