Ejemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <ProductInvoiceViewModel> > > GetProductInvoices()
        {
            List <ProductInvoice> productInvoices = await _productInvoicesRepository.GetAll().ToListAsync();

            return(Ok(_mapper.Map <IEnumerable <ProductInvoiceViewModel> >(productInvoices)));
        }
Ejemplo n.º 2
0
 private bool ProductInvoiceExists(int id)
 {
     return(_productInvoicesRepository.GetAll().Any(p => p.Id == id));
 }