From 52349e365d877585d3d399990226cab6b782933f Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 11 Sep 2020 17:46:08 +0800 Subject: [PATCH 1/2] Update data-filtering.md --- docs/en/Data-Filtering.md | 4 ++-- docs/zh-Hans/Data-Filtering.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/Data-Filtering.md b/docs/en/Data-Filtering.md index 0390c24059..ddf966bcbf 100644 --- a/docs/en/Data-Filtering.md +++ b/docs/en/Data-Filtering.md @@ -156,14 +156,14 @@ Best way to implement a custom filter is to override `ShouldFilterEntity` and ` ````csharp protected bool IsActiveFilterEnabled => DataFilter?.IsEnabled() ?? false; -protected override bool ShouldFilterEntity(IMutableEntityType entityType) where TEntity : class +protected override bool ShouldFilterEntity(IMutableEntityType entityType) { if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))) { return true; } - return base.ShouldFilterEntity(); + return base.ShouldFilterEntity(entityType); } protected override Expression> CreateFilterExpression() diff --git a/docs/zh-Hans/Data-Filtering.md b/docs/zh-Hans/Data-Filtering.md index 4929294e50..45adcb6b05 100644 --- a/docs/zh-Hans/Data-Filtering.md +++ b/docs/zh-Hans/Data-Filtering.md @@ -156,14 +156,14 @@ ABP使用[EF Core的全局过滤](https://docs.microsoft.com/en-us/ef/core/query ````csharp protected bool IsActiveFilterEnabled => DataFilter?.IsEnabled() ?? false; -protected override bool ShouldFilterEntity(IMutableEntityType entityType) where TEntity : class +protected override bool ShouldFilterEntity(IMutableEntityType entityType) { if (typeof(IIsActive).IsAssignableFrom(typeof(TEntity))) { return true; } - return base.ShouldFilterEntity(); + return base.ShouldFilterEntity(entityType); } protected override Expression> CreateFilterExpression() From 02f9d3fa057d6444f0523d2e4beb53be8c95d9a6 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Fri, 11 Sep 2020 17:48:19 +0800 Subject: [PATCH 2/2] Update data-filtering.md --- docs/en/Data-Filtering.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Data-Filtering.md b/docs/en/Data-Filtering.md index ddf966bcbf..62021452bd 100644 --- a/docs/en/Data-Filtering.md +++ b/docs/en/Data-Filtering.md @@ -184,7 +184,7 @@ protected override Expression> CreateFilterExpression