示例#1
0
        public Result <string, TransactionType> GetById(long id)
        {
            try
            {
                _logger.LogInformation("Getting transaction type with id: {0}", id);
                var transactionType = _transactionTypeDao.GetById(id);

                return(Result <string, TransactionType> .ForSuccess(transactionType));
            }
            catch (Exception ex)
            {
                _logger.LogError("Can't get transaction type", ex);
                return(Result <string, TransactionType> .ForFailure("Can't get transaction type"));
            }
        }
示例#2
0
        private bool TransactionTypeExists(long id)
        {
            var transactionType = _transactionTypeDao.GetById(id);

            return(transactionType != null ? true : false);
        }