public async Task <bool> Delete(Guid id)
        {
            var expenseDetails = await _expenseReportDetailRepository.GetDetailsByExpenseId(id);

            foreach (var expenseDetail in expenseDetails)
            {
                _expenseReportDetailRepository.Delete(expenseDetail.Id);
            }

            _expenseReportRepository.Delete(id);

            return(await _expenseReportRepository.UnitOfWork.Commit());
        }
Beispiel #2
0
        public async Task <bool> Delete(Guid id)
        {
            _expenseReportDetailRepository.Delete(id);

            return(await _expenseReportDetailRepository.UnitOfWork.Commit());
        }