public AccountStatus GetById(int AccountStatusId) { var AccountStatus = AccountStatusRepository.GetById(AccountStatusId); if (AccountStatus == null) { throw new BadRequestException(ErrorMessages.GastoNoEncontrado); } return(AccountStatus); }
public AccountStatus GetById(int AccountStatusId) { var AccountStatus = AccountStatusRepository.GetById(AccountStatusId); if (AccountStatus == null) { throw new BadRequestException(ErrorMessages.GastoNoEncontrado); } else { //AccountStatus.PaymentTypeId = PaymentRepository.GetAll().FirstOrDefault(o => o.AccountStatus.Id == AccountStatusId).Id; return(AccountStatus); } }
public void DeleteAccountStatus(int AccountStatusId) { var AccountStatus = AccountStatusRepository.GetById(AccountStatusId); AccountStatusRepository.Delete(AccountStatus); }