static IEnumerable <dynamic> QueryTable(string tableName, string columnName, object lastValue) { using (var connection = new SqlConnection(connectionString)) { var where = new QueryField(columnName, Operation.GreaterThan, lastValue); var orderBy = new OrderField(columnName, Order.Ascending); var top = 100; return(connection.Query(tableName, where, top: top, orderBy: orderBy.AsEnumerable(), hints: SqlServerTableHints.NoLock)); } }