Пример #1
0
        public void Parse(string source, string name, string direction)
        {
            var sort = EntitySort.Parse(source);

            if (string.IsNullOrEmpty(name) && string.IsNullOrEmpty(direction))
            {
                sort.Should().BeNull();
            }
            else
            {
                sort.Should().NotBeNull();
                sort.Name.Should().Be(name);
                sort.Direction.Should().Be(direction);
            }
        }
Пример #2
0
    public EntitySelect(string?query, string?sort)
    {
        Query = query;

        var entitySort = EntitySort.Parse(sort);

        if (entitySort == null)
        {
            return;
        }

        Sort = new List <EntitySort> {
            entitySort
        };
    }