https://github.com/imrostami/telegrambotdependencyinjection
A template built on Telegram.Bot to demonstrate the modular implementation in the Telegram bot using Dependency Injection, an idea taken from ASP.NET projects.
https://github.com/imrostami/telegrambotdependencyinjection
architecture asp-net-core asp-net-mvc controller dependency-injection microsoft telegram telegram-api telegram-bot telegram-bots template template-project templates
Last synced: over 1 year ago
JSON representation
A template built on Telegram.Bot to demonstrate the modular implementation in the Telegram bot using Dependency Injection, an idea taken from ASP.NET projects.
- Host: GitHub
- URL: https://github.com/imrostami/telegrambotdependencyinjection
- Owner: imrostami
- License: mit
- Created: 2024-06-04T09:25:34.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-04T11:09:36.000Z (about 2 years ago)
- Last Synced: 2024-07-12T00:13:07.437Z (almost 2 years ago)
- Topics: architecture, asp-net-core, asp-net-mvc, controller, dependency-injection, microsoft, telegram, telegram-api, telegram-bot, telegram-bots, template, template-project, templates
- Language: C#
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# TelegramBotDependencyInjection
Building Telegram bots in C# language is almost very complicated in development
Therefore, I tried to reduce this complexity with an innovative format and divide the general logic of the program into different classes (under the title of Bot Controller). This idea is taken from ASP.NET MVC projects

The advantage of using this method is that in addition to being able to inject your DB Context and database services into your controllers, you can easily add the relevant module whenever you need the code. Add and remove (via DI Container)