public async Task <ActionResult <IEnumerable <ProductInvoiceViewModel> > > GetProductInvoices() { List <ProductInvoice> productInvoices = await _productInvoicesRepository.GetAll().ToListAsync(); return(Ok(_mapper.Map <IEnumerable <ProductInvoiceViewModel> >(productInvoices))); }
private bool ProductInvoiceExists(int id) { return(_productInvoicesRepository.GetAll().Any(p => p.Id == id)); }