public ActionResult Edit(int InvoiceID) { var model = new Control.UI.Models.InvoiceViewModel(); context = new DALContext(); Invoice retorno = new Invoice(); try { retorno = context.Invoices.Find(p => p.Id == InvoiceID); model.Invoice = retorno; } catch (Exception ex) { throw ex; } return(View("Create", model)); }
public ActionResult Create(Control.UI.Models.InvoiceViewModel Invoice) { return(View("Create", Invoice)); }