ReleaseRepository

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

A release repository.

public class ReleaseRepository : GenericRepository<Release>, IReleaseRepository, IGenericRepository<Release>

Inheritance

objectGenericRepository<Release>ReleaseRepository

Implements

IReleaseRepository, IGenericRepository<Release>

Inherited Members

GenericRepository<Release>.Get(Expression<Func<Release, bool>>, Func<IQueryable<Release>, IOrderedQueryable<Release>>, string, string, int?, int?), GenericRepository<Release>.GetAsync(Expression<Func<Release, bool>>, Func<IQueryable<Release>, IOrderedQueryable<Release>>, string, string, int?, int?, CancellationToken), GenericRepository<Release>.QueryAsync(string, string, string, string, int?, int?, CancellationToken), GenericRepository<Release>.GetById(params object[]), GenericRepository<Release>.GetByIdAsync(params object[]), GenericRepository<Release>.GetByIdAsync(object[], CancellationToken), GenericRepository<Release>.CountAsync(Expression<Func<Release, bool>>, CancellationToken), GenericRepository<Release>.CountAsync(string, CancellationToken), GenericRepository<Release>.Insert(Release), GenericRepository<Release>.InsertAsync(Release, CancellationToken), GenericRepository<Release>.Update(Release), GenericRepository<Release>.Delete(params object[]), GenericRepository<Release>.Delete(Release), GenericRepository<Release>.Save(), GenericRepository<Release>.SaveAsync(CancellationToken), GenericRepository<Release>.DbSet, GenericRepository<Release>.Context, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

ReleaseRepository(BabelDbContext)

Constructor.

public ReleaseRepository(BabelDbContext context)

Parameters

NameDescription

The context.

Methods

AddProductReleaseAsync(int, Release)

Asynchronously adds a product release.

public Task<EntityEntry<ProductAssembly>> AddProductReleaseAsync(int productId, Release release)

Parameters

NameDescription

productId int

The product primary key.

release Release

The release to add.

Returns

AddReleaseAssemblyAsync(int, int, Assembly)

Asynchronously adds a release assembly.

public Task<EntityEntry<ProductAssembly>> AddReleaseAssemblyAsync(int productId, int releaseId, Assembly assembly)

Parameters

NameDescription

productId int

The product primary key.

releaseId int

The release primary key.

assembly Assembly

The assembly to add.

Returns

CopyAsync(Release, Release)

Copy a release object with all the assemblies. Assembly versions will be aligned with the destination release.

public Task CopyAsync(Release source, Release destination)

Parameters

NameDescription

source Release

The release to copy.

destination Release

The destination release object tat will be aligned to source.

Returns

NameDescription

Delete(IEnumerable<int>)

Deletes the given list of releases from the repository. Begins tracking the given list of releases in the Detached state such that it will be deleted in the database when SaveChanges() is called.

public void Delete(IEnumerable<int> releaseIds)

Parameters

NameDescription

releaseIds IEnumerable<int>

The release ids to delete.

GetProductReleasesAsync(int)

Asynchronously gets a list of releases for the given product.

public Task<List<Release>> GetProductReleasesAsync(int productId)

Parameters

NameDescription

productId int

The product primary key.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains a list of release found.

GetReleaseAssembliesAsync(int)

Asynchronously gets a list of assemblies for the given release.

public Task<List<Assembly>> GetReleaseAssembliesAsync(int releaseId)

Parameters

NameDescription

releaseId int

The release primary key.

Returns

NameDescription

A task that represents the asynchronous get operation. The task result contains a list of assembly found.

Last updated