public IEnumerable <Invoice> GetInvoices()
 {
     return(invoicesRepository
            .GetAll()
            .Select(i => i.AutoMapObject <DB.Invoice, Invoice>())
            .OrderByDescending(c => c.InvoiceId));
 }
 // GET: Invoices
 public ActionResult Index()
 {
     return View(db.GetAll());
 }