public async Task EditAsync(ReconciliationEditModel model) { var item = await _repository.GetAsync(model.Id); ReconciliationFactory.Create(model, item, _userId); _repository.Edit(item); await _unitOfWork.SaveChangesAsync(); }
public async Task AddAsync(BankAccountAddModel model) { var result = BankAccountFactory.Create(model, _userId); await _bankAccountRepository.AddAsync(result); if (model.COA_AccountTypeId == 1 || model.COA_AccountTypeId == 2 || model.COA_AccountTypeId == 6 || model.COA_AccountTypeId == 7) { Reconciliation reconciliation = new Reconciliation(); ReconciliationFactory.Create(result.Id, reconciliation); await _reconciliationRepository.AddAsync(reconciliation); } await _unitOfWork.SaveChangesAsync(); }
public async Task AddAsync(ReconciliationAddModel model) { await _repository.AddAsync(ReconciliationFactory.Create(model, _userId)); await _unitOfWork.SaveChangesAsync(); }