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)); }
private TelegramSenderInfoEntity ToEntity() { var entity = new TelegramSenderInfoEntity() { ChatId = ChatId, UserSenderId = UserSenderId }; return(entity); }