We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 831faf0 commit d667fa4Copy full SHA for d667fa4
samples/AzureFunctionsApp/Entities/Lifetime.cs
@@ -75,6 +75,12 @@ public void Delete()
75
protected override MyState InitializeState(TaskEntityOperation operation)
76
{
77
// This method allows for customizing the default state value for a new entity.
78
+ // For async initialization (e.g., loading from a database or external storage), override InitializeStateAsync instead:
79
+ // protected override async ValueTask<MyState> InitializeStateAsync(TaskEntityOperation operation)
80
+ // {
81
+ // var data = await LoadFromDatabaseAsync();
82
+ // return new MyState(data.PropA, data.PropB);
83
+ // }
84
return new(Guid.NewGuid().ToString("N"), Random.Shared.Next(0, 1000));
85
}
86
0 commit comments