2881099
2021-11-16 15:48:33 +08:00

@@ -5,14 +5,14 @@
示例 示例
```csharp ```csharp
Expression<Func<T, bool>> where = a => a.id == Guid.Empty; Expression<Func<T, bool>> where = null;
where = where.And(b => b.num > 0); where = where.And(b => b.num > 0);
where = where.Or(b => b.num > 0); where = where.Or(b => b.num > 0);
``` ```
动态拼接``Or``,通过``Or``扩展方法动态拼接``Lambda``表达式 动态拼接``Or``,通过``Or``扩展方法动态拼接``Lambda``表达式
```csharp ```csharp
Expression<Func<T, bool>> where = a => null; Expression<Func<T, bool>> where = null;
if (xxx) if (xxx)
{ {
where = where.Or(b => b.num > 0); where = where.Or(b => b.num > 0);