public ActionResult Edit([Bind(Include = "InvoiceId,DateCreated,DeliverDate,Vat,TotalPrice,ClientName")] Invoice invoice)
 {
     if (ModelState.IsValid)
     {
         db.Entry(invoice).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(invoice));
 }
        public async Task <ActionResult> Edit([Bind(Include = "InvoiceId,Number,Date,Customer,Amount,DueDate")] Invoice invoice)
        {
            if (ModelState.IsValid)
            {
                db.Entry(invoice).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(invoice));
        }