public ScanExpression <T> FromScan <T>(Expression <Func <T, bool> > filterExpression = null) { var q = new ScanExpression <T>(this) { Limit = PagingLimit, ConsistentRead = !typeof(T).IsGlobalIndex() && this.ConsistentRead, }; if (filterExpression != null) { q.Filter(filterExpression); } return(q); }
public ScanExpression <T> FromScanIndex <T>(Expression <Func <T, bool> > filterExpression = null) { var table = typeof(T).GetIndexTable(); var index = table.GetIndex(typeof(T)); var q = new ScanExpression <T>(this, table) { IndexName = index.Name, Limit = PagingLimit, ConsistentRead = !typeof(T).IsGlobalIndex() && this.ConsistentRead, }; if (filterExpression != null) { q.Filter(filterExpression); } return(q); }