ResourceRepository
Namespace: Babel.Data Assembly: Babel.Data.dll
A resource repository.
Inheritance
object ← GenericRepository<Resource> ← ResourceRepository
Implements
IResourceRepository, IGenericRepository<Resource>
Inherited Members
GenericRepository<Resource>.Get(Expression<Func<Resource, bool>>, Func<IQueryable<Resource>, IOrderedQueryable<Resource>>, string, string, int?, int?), GenericRepository<Resource>.GetAsync(Expression<Func<Resource, bool>>, Func<IQueryable<Resource>, IOrderedQueryable<Resource>>, string, string, int?, int?, CancellationToken), GenericRepository<Resource>.QueryAsync(string, string, string, string, int?, int?, CancellationToken), GenericRepository<Resource>.GetById(params object[]), GenericRepository<Resource>.GetByIdAsync(params object[]), GenericRepository<Resource>.GetByIdAsync(object[], CancellationToken), GenericRepository<Resource>.CountAsync(Expression<Func<Resource, bool>>, CancellationToken), GenericRepository<Resource>.CountAsync(string, CancellationToken), GenericRepository<Resource>.Insert(Resource), GenericRepository<Resource>.InsertAsync(Resource, CancellationToken), GenericRepository<Resource>.Update(Resource), GenericRepository<Resource>.Delete(params object[]), GenericRepository<Resource>.Delete(Resource), GenericRepository<Resource>.Save(), GenericRepository<Resource>.SaveAsync(CancellationToken), GenericRepository<Resource>.DbSet, GenericRepository<Resource>.Context, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ResourceRepository(BabelDbContext)
Constructor.
Parameters
Name | Description |
---|---|
The context. |
Methods
AddDownloadAsync(Download)
Adds a download asynchronous.
Parameters
Name | Description |
---|---|
The download. |
Returns
Name | Description |
---|---|
An asynchronous result that yields the add download. |
Delete(IEnumerable<int>)
Deletes the given list of resources from the repository. Begins tracking the given list of resources in the Detached state such that it will be deleted in the database when SaveChanges() is called.
Parameters
Name | Description |
---|---|
The Resource key identifiers to delete. |
Delete(Resource)
Deletes the given entityToDelete.
Parameters
Name | Description |
---|---|
The entity to delete to delete. |
DeleteDownloads(IEnumerable<int>)
Deletes the downloads described by downloadIds.
Parameters
Name | Description |
---|---|
List of identifiers for the downloads. |
GetDownloadAsync(int)
Gets download asynchronous.
Parameters
Name | Description |
---|---|
Identifier for the download. |
Returns
Name | Description |
---|---|
An asynchronous result that yields the download. |
GetDownloadByAliasAsync(string)
Gets download by alias asynchronous.
Parameters
Name | Description |
---|---|
The alias. |
Returns
Name | Description |
---|---|
An asynchronous result that yields the download by alias. |
GetDownloadsAsync()
Gets downloads asynchronous.
Returns
Name | Description |
---|---|
An asynchronous result that yields the downloads. |
GetResourceType(Resource)
Gets resource type.
Parameters
Name | Description |
---|---|
The entity to delete to delete. |
Returns
Name | Description |
---|---|
The resource type. |
GetSignatureKeysAsync(CancellationToken)
Gets signature keys asynchronous.
Parameters
Name | Description |
---|---|
(Optional) A token that allows processing to be cancelled. |
Returns
Name | Description |
---|---|
An asynchronous result that yields the signature keys. |
TrackResourceAsync(Resource)
Track resource asynchronous.
Parameters
Name | Description |
---|---|
The entity to delete to delete. |
Returns
Name | Description |
---|---|
An asynchronous result. |
UpdateDownload(Download)
Updates the download described by download.
Parameters
Name | Description |
---|---|
The download. |
Last updated