public ActionResult Create(staff a) { if (ModelState.IsValid) { a.DTYPE = "isinsurer"; ause.AddUser(a); return(RedirectToAction("Index")); } return(View()); }
public async Task HandleAsync(CreateCustomerCommand command, ICorrelationContext context) { StaffModel model = new DTOMapper <CreateCustomerCommand, StaffModel>().Serialize(command); CommonResponse result = await _staffService.AddUser(model); if (result.KeyId > 0) { await _busPublisher.PublishAsync( new CustomerCreatedAuthEvent(result.KeyId, command.FirstName, command.LastName, command.UserName, command.ProfileImage, command.Email, command.Password, command.Country, command.State, command.City, command.ZipCode, command.Street, command.Mobile, command.Dob) , context); } }