MicroLite.Builder.SelectSqlBuilder.OrWhere C# (CSharp) Méthode

OrWhere() public méthode

public OrWhere ( string column ) : IWhereSingleColumn
column string
Résultat IWhereSingleColumn
        public IWhereSingleColumn OrWhere(string column)
        {
            if (string.IsNullOrEmpty(column))
            {
                throw new ArgumentException(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("column"));
            }

            this.Operand = " OR";
            this.WhereColumnName = this.SqlCharacters.EscapeSql(column);

            return this;
        }

Same methods

SelectSqlBuilder::OrWhere ( string predicate ) : IAndOrOrderBy

Usage Example

        public void OrWhereThrowsArgumentExceptionForNullPredicate()
        {
            var sqlBuilder = new SelectSqlBuilder(SqlCharacters.Empty);

            var exception = Assert.Throws<ArgumentException>(
                () => sqlBuilder.OrWhere(null, new object()));

            Assert.Equal(ExceptionMessages.ArgumentNullOrEmpty.FormatWith("predicate"), exception.Message);
        }
All Usage Examples Of MicroLite.Builder.SelectSqlBuilder::OrWhere