ProductRepository
Namespace: Babel.Data Assembly: Babel.Data.dll
A product repository.
Inheritance
object ← GenericRepository<Product> ← ProductRepository
Implements
IProductRepository, IGenericRepository<Product>
Inherited Members
GenericRepository<Product>.Get(Expression<Func<Product, bool>>, Func<IQueryable<Product>, IOrderedQueryable<Product>>, string, string, int?, int?), GenericRepository<Product>.GetAsync(Expression<Func<Product, bool>>, Func<IQueryable<Product>, IOrderedQueryable<Product>>, string, string, int?, int?, CancellationToken), GenericRepository<Product>.QueryAsync(string, string, string, string, int?, int?, CancellationToken), GenericRepository<Product>.GroupByAsync(string, string, int?, int?, CancellationToken), GenericRepository<Product>.GetById(params object[]), GenericRepository<Product>.GetByIdAsync(params object[]), GenericRepository<Product>.GetByIdAsync(object[], CancellationToken), GenericRepository<Product>.CountAsync(Expression<Func<Product, bool>>, CancellationToken), GenericRepository<Product>.CountAsync(string, CancellationToken), GenericRepository<Product>.Insert(Product), GenericRepository<Product>.InsertAsync(Product, CancellationToken), GenericRepository<Product>.Update(Product), GenericRepository<Product>.Delete(params object[]), GenericRepository<Product>.Delete(Product), GenericRepository<Product>.Save(), GenericRepository<Product>.SaveAsync(CancellationToken), GenericRepository<Product>.DbSet, GenericRepository<Product>.Context, GenericRepository<Product>.NoTracking, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
ProductRepository(BabelDbContext)
Initializes a new instance of the ProductRepository class.
Parameters
The database context.
Methods
Delete(Product)
Deletes the given entity from the repository. Begins tracking the given entity in the Detached state such that it will be deleted in the database when SaveChanges() is called.
Parameters
The entity to delete to delete.
Delete(IEnumerable<int>)
Deletes a list of products 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.
Parameters
The product primary key ids to delete.
DeleteProductLicenseTemplatesAsync(int, IEnumerable<int>)
Asynchronously deletes the license templates for a given product. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.
Parameters
The product primary key.
List of identifiers for the templates.
Returns
A task that represents the asynchronous delete operation.
DeleteProductReleaseAssemblyAsync(int, int, int)
Asynchronously deletes the released assembly for a given product. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.
Parameters
The product primary key.
The release primary key.
The assembly primary key.
Returns
A task that represents the asynchronous delete operation.
DeleteProductReleaseAsync(int, int)
Asynchronously deletes a product release. Begins tracking the given entities in the Detached state such that they will be deleted in the database when SaveChanges() is called.
Parameters
The product primary key.
The release primary key.
Returns
A task that represents the asynchronous delete operation.
GetByIdAsync(params object[])
Asynchronously gets an entity with the given primary key values. If an entity with the given primary key values exists in the context, then it is returned immediately without making a request to the store. Otherwise, a request is made to the store for an entity with the given primary key values and this entity, if found, is attached to the context and returned. If no entity is found in the context or the store, then null is returned.
Parameters
The values of the primary key for the entity to be found.
Returns
A task that represents the asynchronous get operation. The task result contains the entity found, or null.
GetProductAssembliesAsync(int)
Asynchronously gets a list of assemblies for a given product.
Parameters
The product primary key.
Returns
A task that represents the asynchronous get operation. The task result contains a list of assembly found.
GetProductLicenseTemplatesAsync(int)
Asynchronously gets a list of license templates for the given product.
Parameters
The product primary key.
Returns
A task that represents the asynchronous get operation. The task result contains a list of license template
GetProductLicensesAsync(int)
Asynchronously gets a list of licenses for the given product.
Parameters
The product primary key.
Returns
A task that represents the asynchronous get operation. The task result contains a list of license found.
GetProductReleaseAssembliesAsync(int, int)
Asynchronously gets a list of assemblies for a given product and release.
Parameters
The product primary key.
The release primary key.
Returns
A task that represents the asynchronous get operation. The task result contains a list of assembly found.
GetProductReleaseAssemblyAsync(int, int, int)
Asynchronously gets the assembly for a given product release.
Parameters
The product primary key.
The release primary key.
The assembly primary key.
Returns
A task that represents the asynchronous get operation. The task result contains the assembly found or null.
GetProductReleaseAsync(int, int)
Asynchronously gets the release for the given product.
Parameters
The product primary key.
The release primary key.
Returns
A task that represents the asynchronous get operation. The task result contains the release found or null.
GetProductReleasesAsync(int)
Asynchronously gets a list of releases for the given product.
Parameters
The product primary key.
Returns
A task that represents the asynchronous get operation. The task result contains a list of release found.
Insert(Product)
Inserts the given entity in the repository. Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.
Parameters
The entity to delete to delete.
Examples
InsertAsync(Product, CancellationToken)
Asynchronously inserts the given entity in the repository. Begins tracking the given entity, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.
Parameters
The entity to delete to delete.
(Optional) A token that allows processing to be cancelled.
Returns
An asynchronous result that yields the insert.
InsertProductReleaseAssemblyAsync(int, Release, Assembly)
Asynchronously inserts the given release, assembly record in the repository for a specified product. Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called.
Parameters
The product primary key.
The release primary key.
The assembly primary key.
Returns
A task that represents the asynchronous Insert operation. The task result contains the EntityEntry<
InsertProductReleaseAsync(int, Release)
Asynchronously inserts the given release record in the repository for a specified product. Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Added state such that they will be inserted into the database when SaveChanges() is called
Parameters
The product primary key.
The release object to be inserted.
Returns
A task that represents the asynchronous Insert operation.
UpdateProductReleaseAssemblyAsync(int, Release, Assembly)
Asynchronously updates the given release, assembly record in the repository for a specified product. Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Updated state such that they will be updated into the database when SaveChanges() is called.
Parameters
The product primary key.
The release primary key.
The assembly primary key.
Returns
A task that represents the asynchronous Update operation. The task result contains the ProductAssembly
UpdateProductReleaseAsync(int, Release)
Asynchronously updates the given release record in the repository for a specified product. Begins tracking the given entities, and any other reachable entities that are not already being tracked, in the Updated state such that they will be updated into the database when SaveChanges() is called.
Parameters
The product primary key.
The release object to be updated.
Returns
A task that represents the asynchronous Update operation.
Last updated