protected int GetTheme(string selectedTheme = "") { int themeId = 0; if (string.IsNullOrEmpty(selectedTheme)) { Theme theme = themeRepository.FindFirst(th => th.Name == "Cerulean"); themeId = theme.Id; } else { themeId = int.Parse(selectedTheme); } return(themeId); }