title: NET Core identity grouping of users
body: <p>I currently have a project that uses identity and individual users have access to their own resources (sub database table linked by application user id).  I'd like each user who signs up (admin) to then be able to invite new users to their 'group' and all share the same resource.</p>
  <p>I'm looking at implementing a 'Groups' and 'UserGroups' table similar to the current 'Roles' and 'UserRoles' tables.  Does the following code look ok to achieve this?</p>
  <pre><code>  public class ApplicationUser : IdentityUser
    {
      [MaxLength(30)]
      public string FirstName { get; set; }
      [MaxLength(30)]
      public string LastName { get; set; }
      [MaxLength(100)]
      public string Company { get; set; }
      [MaxLength(30)]
      public string Telephone { get; set; }
      [MaxLength(15)]
      public string Postcode { get; set; }
      public DateTime Created { get; set; } = DateTime.UtcNow;
      public DateTime PasswordResetTime { get; set; } = DateTime.UtcNow;
      public bool PasswordReset { get; set; } = false;
      public virtual ICollection&lt;GSMSite&gt; GSMSites { get; set; }
    }
  
   public class UserGroups
   {
      public virtual ApplicationUser ApplicationUser { get; set; }
      public virtual Groups Groups { get; set; }
   }
  
   public class Groups
   {
      public Guid Id { get; set; }
      [MaxLength(30)]
      public string Name { get; set; }
   }
  </code></pre>