public List <Ledger> GetLedgersByCompany(Company company) { if (company == null) { throw new ArgumentNullException(nameof(company)); } return(ExecuteFaultHandledOperation(() => { ILedgerRepository ledger_repo = _data_repository_factory.GetDataRepository <ILedgerRepository>(); // _business_engine_factory List <Ledger> ledgers = new List <Ledger>(); CompanyData comp = new CompanyData(); comp.CompanyKey = company.CompanyKey; IEnumerable <LedgerData> ledgers_data = ledger_repo.GetAll(comp); foreach (LedgerData ledger_data in ledgers_data) { Ledger ledger = MapLedgerDataToLedger(ledger_data); ledgers.Add(ledger); } return ledgers; })); }
public IActionResult GetAllRecords() { var vReturnVal = LedgerRepo.GetAll(); return(Ok(vReturnVal)); }