Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
        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();
        }