You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above step also applies to custom `EntityTypeConfiguration`s
150
137
151
138
### Querying encrypted properties
152
139
153
-
You can query encrypted properties that are marked as Queryable using the `QueryableExt.WherePdEquals` extension method:
140
+
You can query encrypted properties that are marked as Queryable using the `IQueryable<T>.WherePdEquals` extension method:
154
141
155
142
```csharp
156
143
varfoo=awaitDbContext.Users
@@ -159,11 +146,14 @@ var foo = await DbContext.Users
159
146
```
160
147
161
148
> [!WARNING]
162
-
> The `QueryableExt.WherePdEquals` method is only available for properties that are marked as Queryable using the `[Encrypt(isQueryable: true)]` attribute or the
163
-
> `IsEncrypted(isQueryable: true)` method.
164
-
> And before using `WherePdEquals` you **MUST** call `AddDataProtectionInterceptors` in your `DbContext` configuration.
149
+
> The `QueryableExt.WherePdEquals` method is only available for properties that are marked as Queryable using the `[Encrypt(IsQueryable = true)]` attribute or the
150
+
> `IsEncryptedQueryable()` method.
165
151
166
-
> [!TIP]
152
+
> [!CAUTION]
153
+
> Before using `WherePdEquals` you **MUST** call `AddDataProtectionInterceptors` in your `DbContext` configuration.
154
+
> There will be no error if you forget to call `AddDataProtectionInterceptors`, but the query will not work as expected.
155
+
156
+
> [!NOTE]
167
157
> The `WherePdEquals` extension method generates an expression like this one under the hood:<br/>
0 commit comments