예제 #1
0
파일: AndEx.cs 프로젝트: BestHYC/MyDAL
        /*************************************************************************************************************************************/

        /// <summary>
        /// 与条件
        /// </summary>
        /// <param name="func">格式: it => it.ProductId == Guid.Parse("85ce17c1-10d9-4784-b054-016551e5e109")</param>
        public static WhereU <M> And <M>(this WhereU <M> where, Expression <Func <M, bool> > compareFunc)
            where M : class
        {
            where.DC.Action = ActionEnum.And;
            where.AndHandle(compareFunc);
            return(where);
        }
예제 #2
0
파일: WhereEx.cs 프로젝트: hpc-dal/HPC.DAL
 /// <summary>
 /// 请参阅: <see langword=".Where() &amp; .And() &amp; .Or() 使用 https://www.cnblogs.com/Meng-NET/"/>
 /// </summary>
 public static WhereU <M> Or <M>(this WhereU <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.CreatedOn == Convert.ToDateTime("2018-08-19 11:34:42.577074")</param>
        public static WhereU <M> Or <M>(this WhereU <M> where, Expression <Func <M, bool> > func)
        {
            where.DC.OP.OrHandle(func, CrudTypeEnum.Update);
            return(where);
        }