public async Task <List <InvoiceLineViewModel> > GetInvoiceLineByTrackIdAsync(int id, CancellationToken ct = default(CancellationToken)) { var invoiceLines = await _invoiceLineRepository.GetByTrackIdAsync(id, ct); return(InvoiceLineCoverter.ConvertList(invoiceLines).ToList()); }
public async Task <List <InvoiceLineViewModel> > GetAllInvoiceLineAsync( CancellationToken ct = default(CancellationToken)) { var invoiceLines = InvoiceLineCoverter.ConvertList(await _invoiceLineRepository.GetAllAsync(ct)); return(invoiceLines); }
public async Task <List <InvoiceLineViewModel> > GetAllInvoiceLineAsync(CancellationToken ct = default(CancellationToken)) { var invoiceLines = InvoiceLineCoverter.ConvertList(await _invoiceLineRepository.GetAllAsync(ct)); /*foreach (var invoiceLine in invoiceLines) * { * invoiceLine.Track = await GetTrackByIdAsync(invoiceLine.TrackId, ct); * invoiceLine.Invoice = await GetInvoiceByIdAsync(invoiceLine.InvoiceId, ct); * invoiceLine.TrackName = invoiceLine.Track.Name; * }*/ return(invoiceLines.ToList()); }