public static ITable GetTable(this IQuery query, ObjectName tableName) { var table = query.GetCachedTable(tableName.FullName) as ITable; if (table == null) { table = query.Session.GetTable(tableName); if (table != null) { table = new UserContextTable(query, table); query.CacheTable(tableName.FullName, table); } } return table; }
public static ITable GetTable(this IQueryContext context, ObjectName tableName) { var table = context.GetCachedTable(tableName.FullName) as ITable; if (table == null) { table = context.Session.GetTable(tableName); if (table != null) { table = new UserContextTable(context, table); context.CacheTable(tableName.FullName, table); } } return table; }