IVirtualMachineRepository

Full CRUD repository of virtual machines. Inherit ICanRead<TEntity>, ICanInsert<TEntity>, ICanUpdate<TEntity> and ICanDelete<TEntity> from IGenericRepository<TEntity> - that is where the "a virtual machine is a database record" claim is declared, and it is what the netbase repository test bases detect as capabilities.

Note

ICanGetByKey<TEntity,TKey> get a machine by the VirtualMachineKey its provider assigned; a machine only known by name is read with VirtualMachineNameSpecification.

IPermanentDeletions<TEntity> is the other half of that claim: Delete here MARK, and destroying is a separate, deliberate act.

public interface IVirtualMachineRepository : IGenericRepository<VirtualMachineSettings>,
    ICanGetByKey<VirtualMachineSettings, VirtualMachineKey>,
    IPermanentDeletions<VirtualMachineSettings>

1. Properties

1.1. IsDirty

Gets a value indicating whether uncommitted changes are pending.

bool IsDirty { get; }

2. Methods

2.1. ExecuteDeletionsAsync(CancellationToken)

Destroy every soft-deleted machine, for real, and say what happened.

Task<VirtualMachineDeletionResult> ExecuteDeletionsAsync(CancellationToken cancellationToken = default(CancellationToken))
Table 1. Parameters
Name Type Description

cancellationToken

CancellationToken

Cancellation token.

Returns: Task<VirtualMachineDeletionResult> — The outcome: one Delete per destroyed machine, and a per-record failure list rather than an aborted batch.