/// <summary> /// Initialize, loading all items from database /// </summary> public void InitCache() { _cacheTime = _dao.GetCurrentDate(); var list = _dao.Query <T>().ToList(); LoadItems(list); _internalCacheTime = DateTime.Now; Debug.Print("EntityCache.InitCache : {0:#,##0} Objects of Type {1} cached.", _items.Count, typeof(T).Name); }
public void TestFindCustomer() { var customer = _dao.Query <Customer>() .Where(x => x.Field("LastName").IsEqualTo("Doe")) .And(x => x.Field("FirstName").IsEqualTo("John")) .FirstOrDefault(); Assert.IsNotNull(customer); }
public IQueryable <T> Query() { return(_dao.Query()); }