https://github.com/negativeeddy/botstatediexample
BotState Dependency Injection Example
https://github.com/negativeeddy/botstatediexample
autofac bot bot-framework botframework csharp dependency-injection microsoft-bot-framework
Last synced: 9 months ago
JSON representation
BotState Dependency Injection Example
- Host: GitHub
- URL: https://github.com/negativeeddy/botstatediexample
- Owner: negativeeddy
- License: mit
- Created: 2018-02-12T19:32:55.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T19:56:15.000Z (over 3 years ago)
- Last Synced: 2025-06-29T00:50:02.034Z (10 months ago)
- Topics: autofac, bot, bot-framework, botframework, csharp, dependency-injection, microsoft-bot-framework
- Language: C#
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BotState Dependency Injection Example
## **NOTE:** This example is for BotFramework SDK v3. If you are using v4, see [the v4 documentation](https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-concept-state?view=azure-bot-service-4.0) instead.
This project is an example of how to set up a .NET [Bot Framework](https://dev.botframework.com/) project with the following goals
- configure the bot to [use custom state storage](https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state)
- 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](https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.connector.stateclient) class
The sample is configured to use your local [Cosmos DB Storage Emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-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.