private DBWorker DBWorkerInit() { DBWorker dBWorker = new DBWorker(GetConnectionStringToTestDB()); SetupTestDB(); dBWorker.Connect(); return(dBWorker); }
public virtual void Start() { try { sender_to_tg.Start(); dBWorker.Connect(); Task <User> meWaiting = botClient.GetMeAsync(); meWaiting.Wait(); me = meWaiting.Result; dBWorker.add_user(DateTime.UtcNow, botClient.BotId, token, me.Username); botClient.StartReceiving(); } catch (Exception ex) { logger.Error(ex); } }