Example #1
0
 public RoleStore(DbContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     this.Context    = context;
     this._roleStore = new EntityStore <TRole>(context);
 }
Example #2
0
 protected virtual void Dispose(bool disposing)
 {
     if (this.DisposeContext && disposing && this.Context != null)
     {
         this.Context.Dispose();
     }
     this._disposed  = true;
     this.Context    = null;
     this._userStore = null;
 }
Example #3
0
 public UserStore(DbContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException("context");
     }
     this.Context         = context;
     this.AutoSaveChanges = true;
     this._userStore      = new EntityStore <TUser>(context);
     this._roleStore      = new EntityStore <TRole>(context);
     this._logins         = this.Context.Set <TUserLogin>();
     this._userClaims     = this.Context.Set <TUserClaim>();
     this._userRoles      = this.Context.Set <TUserRole>();
 }