Пример #1
0
        /*************************************************************************************************************************************/

        /// <summary>
        /// 与 条件
        /// </summary>
        /// <param name="func">格式: it => it.Id == m.Id</param>
        public static WhereD <M> And <M>(this WhereD <M> where, Expression <Func <M, bool> > compareFunc)
            where M : class
        {
            where.DC.Action = ActionEnum.And;
            where.AndHandle(compareFunc);
            return(where);
        }
Пример #2
0
 /// <summary>
 /// 请参阅: <see langword=".Where() &amp; .And() &amp; .Or() 使用 https://www.cnblogs.com/Meng-NET/"/>
 /// </summary>
 public static WhereD <M> Or <M>(this WhereD <M> where, Expression <Func <M, bool> > compareFunc)
     where M : class
 {
     where.DC.Action = ActionEnum.Or;
     where.ST_WhereAndOr(compareFunc);
     return(where);
 }
Пример #3
0
        /****************************************************************************************************************************************/

        /// <summary>
        /// 或 条件
        /// </summary>
        /// <param name="func">格式: it => it.Id == m.Id</param>
        public static WhereD <M> Or <M>(this WhereD <M> where, Expression <Func <M, bool> > func)
        {
            where.DC.OP.OrHandle(func, CrudTypeEnum.Delete);
            return(where);
        }