private TableIndexes <T> GetTableIndexesCache <T>() where T : class { object cache; if (this.TableIndexesCaches.TryGetValue(typeof(T), out cache)) { return((TableIndexes <T>)cache); } else { TableIndexes <T> tableCache = new TableIndexes <T>(this.Repository.All <T>().ToList()); this.TableIndexesCaches.Add(typeof(T), tableCache); return(tableCache); } }
internal List <T> GetAllByPropertyValue <T>(PropertyInfo property, object value) where T : class { TableIndexes <T> tableCache = GetTableIndexesCache <T>(); return(tableCache[property][value]); }