/// <summary> /// Executes the Use Case. /// </summary> /// <returns>Task.</returns> public Task Execute(DepositInput input) { if (input.ModelState.IsValid) { return(this.DepositInternal(input.AccountId, input.Amount)); } this._outputPort?.Invalid(input.ModelState); return(Task.CompletedTask); }
/// <inheritdoc /> public Task Execute(Guid accountId, decimal amount, string currency) { var input = new DepositInput(accountId, amount, currency); if (input.ModelState.IsValid) { return(this.DepositInternal(input.AccountId, input.Amount)); } this._outputPort?.Invalid(input.ModelState); return(Task.CompletedTask); }