// GET: InvoiceItems/Create
        public ActionResult Create(Guid id)
        {
            var newInvoiceItem = new InvoiceItemCreateViewModel
            {
                InvoiceId = id
            };

            return(View(newInvoiceItem));
        }
        public ActionResult Create([Bind(Include = "Description,Amount,PriceWithoutTax,InvoiceId")] InvoiceItemCreateViewModel invoiceItem)
        {
            if (ModelState.IsValid)
            {
                var newInvoiceItem = new InvoiceItem()
                {
                    Id              = Guid.NewGuid(),
                    Amount          = invoiceItem.Amount,
                    Description     = invoiceItem.Description,
                    InvoiceId       = invoiceItem.InvoiceId,
                    PriceWithoutTax = invoiceItem.PriceWithoutTax
                };

                db.InvoiceItems.Add(newInvoiceItem);
                db.SaveChanges();
                return(RedirectToAction("Details", "Invoices", new { id = invoiceItem.InvoiceId }));
            }

            return(View(invoiceItem));
        }