public SpendType GetById(int SpendTypeId) { var Spend = SpendTypeRepository.GetById(SpendTypeId); if (Spend == null) { throw new BadRequestException(ErrorMessages.GastoNoEncontrado); } return(Spend); }
private void CreateTransactionTypeRows() { var paymentTypeId = paymentTypeRepository.Add(PAYMENTTYPE_TOADD); var fundTypeId = fundTypeRepository.Add(FUNDTYPE_TOADD); var budgetTypeId = budgetTypeRepository.Add(BUDGETTYPE_TOADD); var spendTypeId = spendTypeRepository.Add(SPENDTYPE_TOADD); PAYMENTTYPE = paymentTypeRepository.GetById(paymentTypeId); BUDGETTYPE = budgetTypeRepository.GetById(budgetTypeId); FUNDTYPE = fundTypeRepository.GetById(fundTypeId); SPENDTYPE = spendTypeRepository.GetById(spendTypeId); }