public static ThemeSettingsViewModel ToThemeSettingsViewModel(this ThemeSettingsRecord record) { return(new ThemeSettingsViewModel() { HeaderLogoUrl = record.HeaderLogoUrl, BaseLineText = record.BaseLineText, PlaceholderLogoUrl = record.PlaceholderLogoUrl, PlaceholderSmallLogoUrl = record.PlaceholderSmallLogoUrl }); }
public ThemeSettingsRecord GetSettingsRecord() { var settings = _repository.Table.SingleOrDefault(); if (settings == null) { _repository.Create(settings = new ThemeSettingsRecord()); } return(settings); }