public RoleStore(DbContext context) { if (context == null) { throw new ArgumentNullException("context"); } this.Context = context; this._roleStore = new EntityStore <TRole>(context); }
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; }
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>(); }