public ActionResult Create(CustomerFormModel formModel) { if (ModelState.IsValid) { AzureQueue<NewCustomerCommand> queue = new AzureQueue<NewCustomerCommand>(account); queue.AddMessage(new NewCustomerCommand { FirstName = formModel.FirstName, LastName = formModel.LastName, Address = formModel.Address, Phone = formModel.Phone, Email = formModel.Email }); return RedirectToAction("Index"); } return View(formModel); }
public ViewResult Create() { var viewModel = new CustomerFormModel(); return View(viewModel); }