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())); } }
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); }
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); } }