Exemple #1
0
        public async Task DeleteAsync(Guid settlementId, Guid userId, Guid expenseId)
        {
            var settlement = await _settlementRepository.GetSettlementOrFailAsync(settlementId);

            var userExpense = settlement.GetUserExpense(userId, expenseId);
            await _settlementRepository.DeleteExpenseAsync(settlementId, userExpense);

            var user = await _userRepository.GetAsync(userId);

            user.RemoveSettlement(settlementId);
        }