/// <summary> /// 更新信息 /// </summary> public int UpdateInfo(SqlTransaction trans, SMSLabelModel smsModel, int SMSLabelId) { string key = "Cache_SMSLabel_Model_" + SMSLabelId; CacheHelper.RemoveCache(key); return(smsDAL.UpdateInfo(trans, smsModel, SMSLabelId)); }
/// <summary> /// 从缓存读取信息 /// </summary> public SMSLabelModel GetCacheInfo(SqlTransaction trans, int SMSLabelId) { string key = "Cache_SMSLabel_Model_" + SMSLabelId; object value = CacheHelper.GetCache(key); if (value != null) { return((SMSLabelModel)value); } else { SMSLabelModel smsModel = smsDAL.GetInfo(trans, SMSLabelId); CacheHelper.AddCache(key, smsModel, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.Normal, null); return(smsModel); } }
/// <summary> /// 插入信息 /// </summary> public int InsertInfo(SqlTransaction trans, SMSLabelModel smsModel) { return(smsDAL.InsertInfo(trans, smsModel)); }