/BotStateDIExample

BotState Dependency Injection Example

Primary LanguageC#MIT LicenseMIT

BotState Dependency Injection Example

NOTE: This example is for BotFramework SDK v3. If you are using v4, see the v4 documentation instead.

This project is an example of how to set up a .NET Bot Framework project with the following goals

  • configure the bot to use custom state storage
  • use dependency injection to load the dialogs & services
  • access the bot state interfaces from the dialogs & services without needing to pass around the IDialogContext or using the deprecated StateClient class

The sample is configured to use your local Cosmos DB Storage Emulator to store the bot's state. You must either install the emulator or change the web.config file to point to an active Azure Cosmos DB location.