title: MVC 5 : Asp.net Identity : How to model UserRole
body: <p>I am new to MVC 5 asp.net Identity model and was looking for means to customise standard Asp.net Identity to suit my needs. Through blog on <a href="http://typecastexception.com/post/2013/11/11/Extending-Identity-Accounts-and-Implementing-Role-Based-Authentication-in-ASPNET-MVC-5.aspx#Adding-the-UserRoles-Method-to-the-AccountController" rel="nofollow noreferrer">TypeCast Exception</a> and one at <a href="https://stackoverflow.com/questions/20979947/how-aspnet-identity-with-my-model">Stackoverflow: How to model Identity</a> I was able to create my own elements in ApplicationUser and ApplicationRole tables. However, my requirement is to add new columns to UserRole table, DATE_FROM and DATE_TO which I did by implementing <code>IdentityUserRole</code> interface. My problem is when I'm trying to save the link UserManager.AddRoleToUser takes only two parameters, UserName and RoleName. How to store parameters for custom <code>ApplicationUserRole</code> ? </p>
  
  <pre><code>public bool AddUserToRole(string userId, SelectUserRolesViewModel roleName)
  {
                  var um = new UserManager&lt;ApplicationUser&gt;(
                      new UserStore&lt;ApplicationUser&gt;(new ApplicationDbContext()));
  
  
                  var idResult = um.AddToRole(userId, roleName);
                  return idResult.Succeeded;
              }
  </code></pre>
  
  <p>the SelectUserRolesViewModel supplies extended IdnetityUserRole model. Any pointer will be appreciated. </p>