TelegramBots / Telegram.Bot.Framework

Simple framework for building Telegram bots
MIT License
97 stars 43 forks source link

Shared scoped between different updates #9

Open tuscen opened 6 years ago

tuscen commented 6 years ago

In your current implementation all update handlers share a scope because getUpdates can return more than one update at a time. I think it would be better if every individual update would have it's own scope. It can be achieved by using IServiceScopeFactory and explicitly creating scope for each update inside HandleUpdateAsync.

tuscen commented 6 years ago

This issue is a part of #14 and will be solved together with it.