コード例 #1
0
        /// <summary>
        /// Return value as SettingValue of all property has EntitySettingValueAttribute
        /// </summary>
        /// <param name="model">Object contains these values</param>
        /// <returns></returns>
        public static IEnumerable <SettingValue> GetSettingValues(object model)
        {
            var settingValueProperties = GetSettingValueProperties(model);

            var settingValueViewModels = settingValueProperties.Select(o => o.GetValue(model) as SettingValueViewModel);

            var settingValues = settingValueViewModels.Select(o => SettingValue.FromViewModel(o));


            return(settingValues);
        }