public void Can_get_ledgerTransaction_by_id()
        {
            var testTransaction = this.GetTestLedgerTransaction();
            var result          = _ledgerTransactionService.GetLedgerTransactionById(testTransaction.Id);

            Assert.Equal(testTransaction, result);
            Assert.True(CommonHelper.ListsEqual(testTransaction.LedgerTransactionLines, result.LedgerTransactionLines));
        }
        public IActionResult Get(int id)
        {
            var ledgerTransaction = _ledgerTransactionService.GetLedgerTransactionById(id);

            if (ledgerTransaction == null)
            {
                return(NotFound(new { Error = "not found" }));
            }
            return(new JsonResult(Mapper.Map <LedgerTransaction, LedgerTransactionViewModel>(ledgerTransaction),
                                  DefaultJsonSettings));
        }