/// <summary>
        /// GetOrAdd history usergame and save levels in game levels. Return levels ids.
        /// </summary>
        /// <param name="context">database context</param>
        /// <param name="userId">auhtorized user identity</param>
        /// <param name="levelsWords">words id array in list of levels</param>
        /// <returns>Levels ids</returns>
        public static async Task <int[]> CreateLevels(this InWordsDataContext context, int userId, IList <int[]> levelsWords)
        {
            var historyGameId = await context.AddOrGetUserHistoryGame(userId).ConfigureAwait(false);

            var levels = await context.CreateLevels(historyGameId, userId, levelsWords).ConfigureAwait(false);

            return(levels);
        }