An open API service indexing awesome lists of open source software.

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.

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

![ff](https://github.com/sapurtcomputer30/TelegramBotDependencyInjection/assets/26039089/8ee6abeb-7075-4d95-a118-6dbf1e58ed63)

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)