Пример #1
0
        static void Main(string[] args)
        {
            // Console.WriteLine("Hello World!");
            try
            {
                Init();
                InitGlobalData();
                NLogHelper.ConsoleInfo($"初始化完成.");
                _ConsoleSrv = new ConsoleSrv(_dbContext);
                _ConsoleSrv.RunJob_FixUserCourse();
                NLogHelper.ConsoleInfo($"[修复完成]");

                NLogHelper.ConsoleInfo($"同步公众号文章.");
                SyncWXNews syncWXNews = new SyncWXNews(_dbContext);
                syncWXNews.Run();

                NLogHelper.ConsoleInfo($"同步了{syncWXNews.SyncCount}条文章,已完成!");
            }
            catch (Exception ex)
            {
                NLogHelper.ConsoleError($"出错啦! {ex.Message}");
            }
        }