public ActionResult Index() { var conditionTypeParameters = GetParameters(); var viewModel = new IsInPersonaViewModel { PersonaCodeName = conditionTypeParameters.PersonaName, AllPersonas = GetAllPersonasViewModel(conditionTypeParameters.PersonaName) }; return(PartialView("~/Components/Personalization/ConditionTypes/IsInPersona/_IsInPersonaConfiguration.cshtml", viewModel)); }
public ActionResult Validate(IsInPersonaViewModel viewModel) { if (!ModelState.IsValid) { viewModel.AllPersonas = GetAllPersonasViewModel(); return(PartialView("~/Components/Personalization/ConditionTypes/IsInPersona/_IsInPersonaConfiguration.cshtml", viewModel)); } var parameters = new IsInPersonaConditionType { PersonaName = viewModel.PersonaCodeName }; return(new ConditionTypeValidationResult(parameters)); }