示例#1
0
        public T Get(string id)
        {
            using (new TimeMonitor(GetPrefix(id)))
            {
                try
                {
                    if (IsCacheReady())
                    {
                        return(cache.Get(id));
                    }

                    return(collection.GetEntityByIdAsync(id).Result);
                }
                catch (Exception ex)
                {
                    LogException(ex);
                    return(default(T));
                }
            }
        }