public static SettingOption FromDataRow(string optionData) { string[] splitData = optionData.Split(":"); var option = new SettingOption { OptionID = int.Parse(splitData[0]), DisplayName = splitData[1], IsSelected = Convert.ToBoolean(int.Parse(splitData[2])) }; return(option); }
public static Setting FromDataRow(SqliteDataReader reader) { var setting = new Setting { SettingID = int.Parse(reader["settingID"].ToString()), DisplayName = reader["Setting Name"].ToString() }; string[] settingOptionList = (reader["options"].ToString()).Split(','); foreach (string optionString in settingOptionList) { setting.Options.Add(SettingOption.FromDataRow(optionString)); } return(setting); }