Example #1
0
 public static InteractiveForm ToEntity(this InteractiveFormModel model)
 {
     return(model.MapTo <InteractiveFormModel, InteractiveForm>());
 }
Example #2
0
 public static InteractiveForm ToEntity(this InteractiveFormModel model, InteractiveForm destination)
 {
     return(model.MapTo(destination));
 }
Example #3
0
        protected virtual List <LocalizedProperty> UpdateLocales(InteractiveForm iform, InteractiveFormModel model)
        {
            List <LocalizedProperty> localized = new List <LocalizedProperty>();

            foreach (var local in model.Locales)
            {
                localized.Add(new LocalizedProperty()
                {
                    LanguageId  = local.LanguageId,
                    LocaleKey   = "Name",
                    LocaleValue = local.Name
                });

                localized.Add(new LocalizedProperty()
                {
                    LanguageId  = local.LanguageId,
                    LocaleKey   = "Body",
                    LocaleValue = local.Body
                });
            }
            return(localized);
        }