LicenseTokenRepository
Namespace: Babel.Data Assembly: Babel.Data.dll
A license token repository.
Inheritance
object ← GenericRepository<LicenseToken> ← LicenseTokenRepository
Implements
ILicenseTokenRepository, IGenericRepository<LicenseToken>
Inherited Members
GenericRepository<LicenseToken>.Get(Expression<Func<LicenseToken, bool>>, Func<IQueryable<LicenseToken>, IOrderedQueryable<LicenseToken>>, string, string, int?, int?), GenericRepository<LicenseToken>.GetAsync(Expression<Func<LicenseToken, bool>>, Func<IQueryable<LicenseToken>, IOrderedQueryable<LicenseToken>>, string, string, int?, int?, CancellationToken), GenericRepository<LicenseToken>.QueryAsync(string, string, string, string, int?, int?, CancellationToken), GenericRepository<LicenseToken>.GroupByAsync(string, string, int?, int?, CancellationToken), GenericRepository<LicenseToken>.GetById(params object[]), GenericRepository<LicenseToken>.GetByIdAsync(params object[]), GenericRepository<LicenseToken>.GetByIdAsync(object[], CancellationToken), GenericRepository<LicenseToken>.CountAsync(Expression<Func<LicenseToken, bool>>, CancellationToken), GenericRepository<LicenseToken>.CountAsync(string, CancellationToken), GenericRepository<LicenseToken>.Insert(LicenseToken), GenericRepository<LicenseToken>.InsertAsync(LicenseToken, CancellationToken), GenericRepository<LicenseToken>.Update(LicenseToken), GenericRepository<LicenseToken>.Delete(params object[]), GenericRepository<LicenseToken>.Delete(LicenseToken), GenericRepository<LicenseToken>.Save(), GenericRepository<LicenseToken>.SaveAsync(CancellationToken), GenericRepository<LicenseToken>.DbSet, GenericRepository<LicenseToken>.Context, GenericRepository<LicenseToken>.NoTracking, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
LicenseTokenRepository(BabelDbContext)
Initializes a new instance of the class.
Parameters
The database context.
Methods
CountActiveTokensAsync(int)
Returns the number of active tokens for a given license
Parameters
The license id
Returns
The number of active tokens
CountAsync(int, string, CancellationToken)
Asynchronously returns the number of license tokes in the repository for a given license.
Parameters
The ID of the license to count tokens for.
Specifies the string filter.
(Optional) A token that allows processing to be cancelled.
Returns
An asynchronous result that yields the number of elements in the repository.
Delete(IEnumerable<int>)
Deletes a list of license tokens with the given primary key values.
Parameters
The license token primary key ids to delete.
DeleteExpiredTokensAsync(int)
Delete token that have expired for a given license
Parameters
The license id
Returns
InsertAsync(LicenseToken, CancellationToken)
Inserts a new entity into the database.
Parameters
The entity to insert.
The cancellation token.
Returns
The for the newly inserted entity.
QueryAsync(int, string, string, string, string, int?, int?, CancellationToken)
Asynchronously queries a list of LicenseToken objects for a given license from this repository.
Parameters
The ID of the license to retrieve tokens for.
(Optional) Specifies a select expression.
(Optional) Specifies the filter expression.
(Optional) Order by expression.
(Optional) A comma separated list of nested entity names to retrieve.
(Optional) The number of records to skip before the first record found.
(Optional) The number of records to take after the first record found.
(Optional) A token that allows processing to be cancelled.
Returns
A task that represents the asynchronous get operation, containing a list of LicenseToken objects.
Update(LicenseToken)
Updates the given license token in the repository. Begins tracking the given entity in the Modified state such that it will be updated in the database when SaveChanges() is called.
Parameters
The license token to update.
Last updated