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
Copy file name to clipboardExpand all lines: articles/dotnet/bot-builder-dotnet-state.md
+26-17Lines changed: 26 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,29 +18,38 @@ ms.date: 12/13/17
18
18
19
19
## In-memory data storage
20
20
21
-
In-memory data storage is intended for testing only. This storage is volatile and temporary. The data is cleared each time the bot is restarted. To use the in-memory storage for testing purposes, you will need to do two things. First, within the **Conversation.UpdateContainer** method, create a new instance of the in-memory storage:
21
+
In-memory data storage is intended for testing only. This storage is volatile and temporary. The data is cleared each time the bot is restarted. To use the in-memory storage for testing purposes, you will need to:
22
22
23
-
```cs
24
-
Conversation.UpdateContainer(
25
-
builder=>
26
-
{
27
-
varstore=newInMemoryDataStore();
28
-
...
29
-
});
30
-
```
23
+
Install the following NuGet packages:
24
+
- Microsoft.Bot.Builder.Azure
25
+
- Autofac.WebApi2
31
26
32
-
Then, register the new data store:
27
+
In the **Application_Start** method, create a new instance of the in-memory storage, and register the new data store:
0 commit comments