Beispiel #1
0
        public void Execute(JobExecutionContext context)
        {
            var _commonService = new CommonService();

            try
            {
                _commonService.UpdateNewsExtraApp();
            }
            catch (Exception ex)
            {
                NLogHelper.WriteError(string.Format("{0}\r\n{1}", ex.Message, ex.StackTrace.ToString()));
            }
        }
Beispiel #2
0
        public T QueryFirst(Expression <Func <T, bool> > predicate)
        {
            T model = null;

            try
            {
                model = Db.Set <T>().AsNoTracking().FirstOrDefault(predicate);
            }
            catch (Exception ex)
            {
                NLogHelper.WriteError(ex.Message);
            }
            return(model);
        }
Beispiel #3
0
 public void Capture()
 {
     try
     {
         var categoryList = Enum.GetNames(typeof(TencentCategory));
         foreach (var item_category in categoryList)
         {
         }
     }
     catch (Exception ex)
     {
         NLogHelper.WriteError(ex.Message);
         NLogHelper.WriteError(ex.StackTrace);
     }
 }