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>.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, 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
Name | Description |
---|---|
| The database context. |
Methods
CountActiveTokensAsync(int)
Returns the number of active tokens for a given license
Parameters
Name | Description |
---|---|
| The license id |
Returns
Delete(IEnumerable<int>)
Deletes a list of license tokens with the given primary key values.
Parameters
Name | Description |
---|---|
| The license token primary key ids to delete. |
DeleteExpiredTokensAsync(int)
Delete token that have expired for a given license
Parameters
Name | Description |
---|---|
| The license id |
Returns
Name | Description |
---|---|
InsertAsync(LicenseToken, CancellationToken)
Inserts a new entity into the database.
Parameters
Name | Description |
---|---|
| The entity to insert. |
| The cancellation token. |
Returns
Name | Description |
---|---|
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
Name | Description |
---|---|
| 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
Name | Description |
---|---|
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
Name | Description |
---|---|
| The license token to update. |
Last updated