public static List <MappedRecord> GetTable(this DataContext context, string tableName)
        {
            EntityProperty model   = GetEntityProperty(context, tableName);
            ITable         records = (ITable)model.Property.GetValue(context, null);

            return(records.Cast <MappedRecord>().ToList());
        }
Beispiel #2
0
        public IQueryable <T> Query <T>() where T : class
        {
            ITable table = this.m_DataContext.GetTable(typeof(T));

            return(table.Cast <T>());
        }