Exemplo n.º 1
0
        public List <DatabaseTableWindows> GetTablesMentionedInQuery(QueryWindows query)
        {
            List <DatabaseTableWindows> result = new List <DatabaseTableWindows>();

            foreach (string t in query.TableNamesInQuery)
            {
                DatabaseTableWindows table = _tables[t];
                if (table == null)
                {
                    throw new NullReferenceException(string.Format(
                                                         "Could not find table {0} mentioned in {1} inside {2}.",
                                                         t,
                                                         query.GetType().FullName,
                                                         this.GetType().FullName));
                }
                result.Add(table);
            }
            return(result);
        }
Exemplo n.º 2
0
        public virtual List <object> Query(
            string columnName,
            object columnValue,
            string tableName,
            string propertyNameFilter,
            Type entityType,
            bool disposeConnectionAfterExecute,
            DbConnection connection,
            DbTransaction transaction)
        {
            DatabaseTableWindows table = GetDatabaseTable(tableName);

            if (table == null)
            {
                throw new NullReferenceException(string.Format(
                                                     "Could not find {0} with name {1}.",
                                                     typeof(DatabaseTableWindows).FullName,
                                                     tableName));
            }
            return(table.Query(columnName, columnValue, propertyNameFilter, entityType, disposeConnectionAfterExecute, connection, transaction));
        }