Exemple #1
0
 public void TestOr()
 {
     _clause.Where("Age", 1);
     _clause.Or(new LessCondition("a", "@a"));
     Assert.Equal("Where ([Age]=@_p_0 Or a<@a)", GetSql());
 }
 /// <summary>
 /// Or连接条件
 /// </summary>
 /// <param name="condition">查询条件</param>
 /// <returns></returns>
 public ISqlBuilder Or(ICondition condition)
 {
     WhereClause.Or(condition);
     return(this);
 }
 /// <summary>
 /// Or连接条件
 /// </summary>
 /// <typeparam name="TEntity">实体类型</typeparam>
 /// <param name="conditions">查询条件</param>
 /// <returns></returns>
 public ISqlBuilder Or <TEntity>(params Expression <Func <TEntity, bool> >[] conditions)
 {
     WhereClause.Or(conditions);
     return(this);
 }
Exemple #4
0
 /// <summary>
 /// Or连接条件
 /// </summary>
 /// <typeparam name="TEntity">实体类型</typeparam>
 /// <param name="conditions">查询条件</param>
 /// <returns></returns>
 public virtual ISqlBuilder Or <TEntity>(params Expression <Func <TEntity, bool> >[] conditions) where TEntity : class
 {
     WhereClause.Or(conditions);
     return(this);
 }