IUserRepository

Namespace: Babel.Data Assembly: Babel.Data.dll

Interface for user repository.

public interface IUserRepository : IGenericRepository<User>

Implements

IGenericRepository<User>

Methods

CountAsync(string, string, CancellationToken)

Asynchronously returns the number of elements in the repository.

Task<int> CountAsync(string filter = null, string roles = null, CancellationToken cancellationToken = default)

Parameters

NameDescription

filter string

(Optional) Specifies the filter.

roles string

(Optional) Specifies the list of roles the use belong.

cancellationToken CancellationToken

(Optional) A token that allows processing to be cancelled.

Returns

NameDescription

An asynchronous result that yields the number of elements in the repository.

Delete(IEnumerable<string>)

Deletes a list of user with the given primary key values. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.

void Delete(IEnumerable<string> usersIds)

Parameters

NameDescription

The users Identifiers to delete.

GetRolesAsync()

Asynchronously gets the list of user roles.

Task<IEnumerable<IdentityRole>> GetRolesAsync()

Returns

NameDescription

An asynchronous result that yields the user roles.

QueryAsync(string, string, string, string, int?, int?, string, CancellationToken)

Asynchronously query a list of users from this repository.

Task<List<User>> QueryAsync(string select = null, string filter = null, string orderBy = null, string includeProperties = "", int? skip = null, int? take = null, string roles = null, CancellationToken cancellationToken = default)

Parameters

NameDescription

select string

(Optional) Specifies a select expression.

filter string

(Optional) Specifies the filter expression.

orderBy string

(Optional) Order by expression.

includeProperties string

(Optional) A comma separated list of nested entity names to retrieve.

skip int?

(Optional) The number of records to skip before the first record found.

take int?

(Optional) The number of records to take after the first record found.

roles string

(Optional) Specifies the list of roles the use belong.

cancellationToken CancellationToken

(Optional) A token that allows processing to be cancelled.

Returns

NameDescription

A task that represents the asynchronous get operation.

Last updated