Skip to content

Commit 46995d2

Browse files
Merge pull request #212101 from davidmrdavid/dajusto/add-entity-declaration-warning
Include indexing "edge-case" in class-based Durable Entities
2 parents 6759866 + 5ad9045 commit 46995d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

articles/azure-functions/durable/durable-functions-dotnet-entities.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public class Counter
6666

6767
The `Run` function contains the boilerplate required for using the class-based syntax. It must be a *static* Azure Function. It executes once for each operation message that is processed by the entity. When `DispatchAsync<T>` is called and the entity isn't already in memory, it constructs an object of type `T` and populates its fields from the last persisted JSON found in storage (if any). Then it invokes the method with the matching name.
6868

69+
The `EntityTrigger` Function, `Run` in this sample, does not need to reside within the Entity class itself. It may reside within any valid location for an Azure Function: inside the top-level namespace, or inside a top-level class. However, if nested deeper (e.g, the Function is declared inside a *nested* class), then this Function will not be recognized by the latest runtime.
70+
6971
> [!NOTE]
7072
> The state of a class-based entity is **created implicitly** before the entity processes an operation, and can be **deleted explicitly** in an operation by calling `Entity.Current.DeleteState()`.
7173

0 commit comments

Comments
 (0)