Пример #1
0
        public WordPair[] GetUnknownWords(QueryCriteria queryCriteria = null)
        {
            var orderByCreatedAtDescCriteria = new QueryCriteria
            {
                OrderByCriteria = new OrderByCriteria {
                    OrderBy = OrderBy.CreatedAt, SortOrder = SortOrder.DESC
                }
            };

            if (queryCriteria == null)
            {
                queryCriteria = orderByCreatedAtDescCriteria;
            }
            else if (queryCriteria.OrderByCriteria == null)
            {
                queryCriteria.OrderByCriteria = orderByCreatedAtDescCriteria.OrderByCriteria;
            }

            WordPair[] unknownWords = _wordsRepository.GetUnknownWords(queryCriteria);

            return(unknownWords);
        }