Exemple #1
0
        internal override DialogContext GetOrCreateDialogContext(BotFrameworkDbContext dbContext)
        {
            var contextSenderInfo = TelegramSenderInfoEntity.GetOrCreate(this, dbContext);
            var contextModel      = DialogContextEntity.GetOrCreate(contextSenderInfo, ContextType, dbContext);

            return(new DialogContext(contextModel.State, contextModel.SenderInfoId, this, dbContext));
        }
Exemple #2
0
        private TelegramSenderInfoEntity ToEntity()
        {
            var entity = new TelegramSenderInfoEntity()
            {
                ChatId       = ChatId,
                UserSenderId = UserSenderId
            };

            return(entity);
        }