/// <summary> /// Invoked by GetAllCommand() if validation and business rules execute successfully /// </summary> protected virtual async Task <IEnumerable <T> > GetAllAsync(ExecutionContext <T> context) { return(await _dataProxy.GetAllAsync()); }
/// <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="GetAllCommand"/>, 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="context">Serves as shared state between all pipeline methods invoked by the command returned by <see cref="GetAllCommand"/>.</param> /// <returns>An awaitable resource list returned from <see cref="Peasy.ISupportGetAll{T}.GetAllAsync"/> of <see cref="DataProxy"/>.</returns> protected virtual async Task <IEnumerable <T> > OnGetAllCommandValidationSuccessAsync(ExecutionContext <T> context) { return(await _dataProxy.GetAllAsync()); }