コード例 #1
0
        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);
        }
コード例 #2
0
 public List <Theme> GetThemes()
 {
     return(themeRepository.GetAllThemes().ToList());
 }