Store does not implement IUserRoleStore<TUser>
<p>I have my own customized Entity Store User and Entity Store Role. What I am trying now is to add user to roles. By doing this</p>

<pre><code>public void CreateUser(RegisterBindingModel model, String roleName)
   {
        try
        {
            ApplicationRole role = null;
            if (!UserRoleManager.RoleExists(roleName))
            {
                role = new ApplicationRole() { Name = roleName, Id = Suid.NewSuid().ToString() };
                IdentityResult result = UserRoleManager.Create(role);
            }
            else
            {
                role = UserRoleManager.FindByName(roleName);
            }

            var user = new ApplicationUser() { UserName = model.Email, Email = model.Email };

            IdentityResult result1 = UserManager.Create(user, model.Password);

            UserManager.AddToRole(user.Id, role.Id);

        }
        catch (Exception e)
        {
            throw new Exception(e.Message.ToString()); // I get an exception here saying, Store does not implement IUserRoleStore&lt;TUser&gt;
        }

  }
</code></pre>

<p>After that I implement that. I have this function now</p>

<pre><code>    public Task&lt;IList&lt;string&gt;&gt; GetRolesAsync(TUser user)
    {

        throw new NotImplementedException();
    }
</code></pre>

<p>How do I implement it? I mean how to I send in the roles the user have? My complete Entity user store is as follows</p>

<pre><code>    public class EntityUserStore&lt;TUser, TAccount&gt; : IUserStore&lt;TUser&gt;, IUserPasswordStore&lt;TUser&gt;, IUserEmailStore&lt;TUser&gt; ,  IUserRoleStore&lt;TUser&gt;
    where TUser : class, IApplicationUser&lt;TAccount&gt;, new()
    where TAccount : EntityModel, new()
{
    public async Task CreateAsync(TUser user)
    {
        TableHelper.Save&lt;TAccount&gt;(user.Account);
        EntityIndex.Set&lt;TAccount&gt;(user.UserName, user.Account);
    }

    public Task DeleteAsync(TUser user)
    {
        throw new NotImplementedException();
    }

    public void Dispose()
    {

    }

    public async Task&lt;TUser&gt; FindByIdAsync(string userId)
    {
        TAccount account = TableHelper.Get&lt;TAccount&gt;(userId);

        if (account == null)
            return null;

        return new TUser()
        {
            Account = account
        };

    }

    public async Task&lt;TUser&gt; FindByNameAsync(string userName)
    {
        TAccount account = EntityIndex.Get&lt;TAccount&gt;(userName);

        if (account == null)
            return null;

        return new TUser()
        {
            Account = account
        };
    }

    public Task UpdateAsync(TUser user)
    {
        throw new NotImplementedException();
    }

    public async Task SetPasswordHashAsync(TUser user, string passwordHash)
    {
        user.PasswordHash = passwordHash;

    }

    public async Task&lt;string&gt; GetPasswordHashAsync(TUser user)
    {
        return user.PasswordHash;
    }

    public async Task&lt;bool&gt; HasPasswordAsync(TUser user)
    {
        return user.PasswordHash != null;
    }

    public async Task SetEmailAsync(TUser user, string email)
    {
        user.Email = email;
    }

    public async Task&lt;string&gt; GetEmailAsync(TUser user)
    {
        return user.Email;
    }

    public Task&lt;bool&gt; GetEmailConfirmedAsync(TUser user)
    {
        throw new NotImplementedException();
    }

    public Task SetEmailConfirmedAsync(TUser user, bool confirmed)
    {
        throw new NotImplementedException();
    }

    public async Task&lt;TUser&gt; FindByEmailAsync(string email)
    {
        TAccount account = EntityIndex.Get&lt;TAccount&gt;(email);

        if (account == null)
            return null;

        return new TUser()
        {
            Account = account
        };
    }

    public Task AddToRoleAsync(TUser user, string roleName)
    {
        throw new NotImplementedException();
    }

    public Task RemoveFromRoleAsync(TUser user, string roleName)
    {
        throw new NotImplementedException();
    }

    public Task&lt;IList&lt;string&gt;&gt; GetRolesAsync(TUser user)
    {

        throw new NotImplementedException();
    }

    public Task&lt;bool&gt; IsInRoleAsync(TUser user, string roleName)
    {
        throw new NotImplementedException();
    } 
}
</code></pre>

<p>I am now trying this</p>

<pre><code>    public Task&lt;IList&lt;string&gt;&gt; GetRolesAsync(TUser user)
    {
        List&lt;string&gt; roles = new UserManager&lt;TUser&gt;(this).GetRoles(user.Id).ToList();
        return Task.FromResult((IList&lt;string&gt;)roles);
    }
</code></pre>

<p>But it is not working. I am getting timed out exception. </p>