Beispiel #1
0
        public async Task <ActionResult <IEnumerable <ServiceInvoiceViewModel> > > GetServiceInvoices()
        {
            List <ServiceInvoice> serviceInvoices = await _serviceInvoicesRepository.GetAll()
                                                    .Include(s => s.Client)
                                                    .ToListAsync();

            return(Ok(_mapper.Map <IEnumerable <ServiceInvoiceViewModel> >(serviceInvoices)));
        }
Beispiel #2
0
 private bool ServiceInvoiceExists(int id)
 {
     return(_serviceInvoicesRepository.GetAll().Any(s => s.Id == id));
 }