/*************************************************************************************************************************************/ /// <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); }
/// <summary> /// 请参阅: <see langword=".Where() & .And() & .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); }
/****************************************************************************************************************************************/ /// <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); }