private Room CreateRoom() { var roomSettings = new RoomSettings(); var themes = themeRepository.GetAllThemes(); var words = GetMixedWordsFromThemes(themes); var newRoom = new Room { Game = CreateGame(words, roomSettings), Settings = roomSettings }; roomRepository.Insert(newRoom); foreach (var theme in themes) { newRoom.Settings.ThemeRoomSettings.Add(new ThemeRoomSettings { RoomSettingsId = newRoom.Settings.Id, ThemeId = theme.Id }); } return(newRoom); }
public List <Theme> GetThemes() { return(themeRepository.GetAllThemes().ToList()); }