Ejemplo n.º 1
0
        public IActionResult GetExpenseForCostCenter(string costcenterId)
        {
            _logger.LogInformation("Processing GetExpenseForCostCenter Request");
            var expenseFromDB = _claimRepository.GetExpenseForCostCenter(costcenterId);

            if (expenseFromDB == null)
            {
                return(NotFound());
            }

            var expenseDto = Mapper.Map <ClaimsDto>(expenseFromDB);

            _logger.LogInformation("Completed processing GetExpenseForCostCenter Request - {@expenseDto}");

            return(Ok(expenseDto));
        }