感谢我在上从zambonee得到的帮助 using (DEntities Context = DAOHelper.GetObjectContext<DEntities>())Guid aspUserIdToRemove= Context.ExecuteStoreQuery<string>("Select UserId FROM aspnet_Users where UserName
EventArgs e) MembershipUser newUser = System.Web.Security.Membership.GetUser(CreateUserWizard.UserName);
Profile.UserName = newUser.UserName; // Get and Set the user name after sign up.Guid Id = (Guid)newUser.ProviderUserKey; /