RoleManager<TRole>.Roles Property

Definition

Gets an IQueryable collection of Roles if the persistence store is an IQueryableRoleStore<TRole>, otherwise throws a NotSupportedException.

public:
 virtual property System::Linq::IQueryable<TRole> ^ Roles { System::Linq::IQueryable<TRole> ^ get(); };
public virtual System.Linq.IQueryable<TRole> Roles { get; }
member this.Roles : System.Linq.IQueryable<'Role (requires 'Role : null)>
Public Overridable ReadOnly Property Roles As IQueryable(Of TRole)

Property Value

IQueryable<TRole>

An IQueryable collection of Roles if the persistence store is an IQueryableRoleStore<TRole>.

Exceptions

Thrown if the persistence store is not an IQueryableRoleStore<TRole>.

Remarks

Callers to this property should use SupportsQueryableRoles to ensure the backing role store supports returning an IQueryable list of roles.

Applies to