コード例 #1
0
 public ActionResult Create(CustomerFormModel form)
 {
     if (ModelState.IsValid)
     {
     //maps to domain object from view model
     var command = Mapper.Map<CustomerFormModel,
     NewCustomerCommand>(form);
     var message = new BrokeredMessage(command);
     // Send customer message to Service Bus Queue
     ServiceBusQueueHelper.CustomersQueueClient.Send(message);
     return RedirectToAction("Index");
     }
     return View(form);
 }
コード例 #2
0
 public ViewResult Create()
 {
     var viewModel = new CustomerFormModel();
     return View(viewModel);
 }