public ActionResult AddCustomer(Guid testId, [Bind(Prefix = CustomersConsts.RouteServiceValue)] TestModel model) { var cmd = new CreateCustomer() { Id = testId, Name = model.Name, Surname = model.Surname }; _bus.Send(cmd); return RequestHandled(); }
public ActionResult AddCustomer(Guid testId, [Bind(Prefix = CustomersConsts.RouteServiceValue)] TestModel model, bool isModelValid = true) { if(!isModelValid) return ViewModel(new ViewModel(UIKeysAreaTest.AddCustomer.PersonalData, p => p.Html.Action("AddCustomer", new { model }))); var cmd = new CreateCustomer() { Id = testId, Name = model.Name, Surname = model.Surname }; _bus.Send(cmd); return RequestHandled(); }