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