Updated 表达式函数 (markdown)

IGeekFan
2021-11-15 09:49:32 +08:00
parent 68259b7b77
commit 98844f2b97

@@ -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);