123456789101112131415161718192021222324252627282930 |
- using CP.Cache;
- using CP.Model;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CP.Business
- {
- public class Kjh_TdkBLL
- {
- /// 缓存
- /// </summary>
- static WMCache cache = WMCache.GetCacheService();
- public Kjh_Tdk GetList(int cid)
- {
- DataConnect dc = new DataConnect();
- string key = "Kjh_Tdk";
- List<Kjh_Tdk> list = cache.GetObject<List<Kjh_Tdk>>(key);
- if (list == null)
- {
- list = dc.db.Fetch<Kjh_Tdk>("");
- cache.AddObject(key, list, (int)CacheTime.System);
- }
- return list.Where(a=>a.cid==cid).FirstOrDefault();
- }
- }
- }
|