Beispiel #1
0
        public as_sqlGet GetSql(int id)
        {
            var res = new as_sqlGet();
            var key = "as_sqlGet_id_" + id;

            if (CacheManager.EnableCaching && CacheManager.Cache[key] != null && false)
            {
                res = (as_sqlGet)CacheManager.Cache[key];
            }
            else
            {
                try
                {
                    res = db.GetSqlGet(id);
                    CacheManager.CacheData(key, res);
                }
                catch (Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            return(res);
        }