public bool SaveTheme(MobileTheme theme) { if (theme == null) { return(true); } return(_themeRepository.SaveSettings(theme.ApiThemeToEntityModel())); }
public static Entities.ThemeSettingsEntity ApiThemeToEntityModel(this MobileTheme model) { var mainColor = HexStringToByteArray(model.MainColor); var result = new Entities.ThemeSettingsEntity { Id = model.Id, MainColorA = mainColor[3], MainColorR = mainColor[0], MainColorG = mainColor[1], MainColorB = mainColor[2], }; return(result); }