/// <summary> /// Performs additional business logic and data proxy interaction. /// </summary> /// <remarks> /// <para>This is the third and final method invoked within the execution pipeline of the command returned by <see cref="DeleteCommand"/>, triggered by <see cref="CommandBase.ExecuteAsync"/>.</para> /// <para>Override this method to invoke custom business logic and data proxy interaction.</para> /// <para>This method is only invoked based on the successful validation of all configured validation and business rules.</para> /// </remarks> /// <param name="id">The id of the resource to delete.</param> /// <param name="context">Serves as shared state between all pipeline methods invoked by the command returned by <see cref="DeleteCommand"/>.</param> /// <returns>An awaitable <see cref="Task"/> resulting from a call to <see cref="Peasy.ISupportDelete{T}.DeleteAsync"/> of <see cref="DataProxy"/>.</returns> protected virtual Task OnDeleteCommandValidationSuccessAsync(TKey id, ExecutionContext <T> context) { return(_dataProxy.DeleteAsync(id)); }
/// <summary> /// Invoked by DeleteCommand() if validation and business rules execute successfully /// </summary> protected virtual Task DeleteAsync(TKey id, ExecutionContext <T> context) { return(_dataProxy.DeleteAsync(id)); }