Ejemplo n.º 1
0
        public List <InvoiceModel> GetInvoicesByCompanyId(int companyId, int currentPage, int pageSize, ref int totalRecords)
        {
            List <InvoiceModel> invoiceModelList = new List <InvoiceModel>();

            totalRecords = invoiceRepository.Count(x => x.CompanyId == companyId && x.RecordDeleted == false);
            List <Invoice> invoiceList = invoiceRepository.GetPagedRecords(x => x.CompanyId == companyId && x.RecordDeleted == false, y => y.Subject, currentPage, pageSize).ToList();

            AutoMapper.Mapper.Map(invoiceList, invoiceModelList);
            return(invoiceModelList);
        }