BuildDistinctPart() public method

public BuildDistinctPart ( SqlStatement sqlStatement, ISqlCommandBuilder commandBuilder ) : void
sqlStatement Remotion.Linq.SqlBackend.SqlStatementModel.SqlStatement
commandBuilder ISqlCommandBuilder
return void
示例#1
0
        public void BuildDistinctPart()
        {
            var sqlStatement = SqlStatementModelObjectMother.CreateMinimalSqlStatement(new SqlStatementBuilder {
                IsDistinctQuery = true
            });

            _generator.BuildDistinctPart(sqlStatement, _commandBuilder);

            Assert.That(_commandBuilder.GetCommandText(), Is.EqualTo("DISTINCT "));
            _stageMock.VerifyAllExpectations();
        }
示例#2
0
        public void BuildDistinctPart()
        {
            var sqlStatement = new SqlStatement(
                new TestStreamedValueInfo(typeof(int)),
                _entityExpression,
                new[] { _sqlTable },
                null,
                null,
                new Ordering[] { },
                null,
                true,
                null,
                null);

            _generator.BuildDistinctPart(sqlStatement, _commandBuilder);

            Assert.That(_commandBuilder.GetCommandText(), Is.EqualTo("DISTINCT "));
            _stageMock.VerifyAllExpectations();
        }