public IEnumerable <T> Query <T>(DataCondition condition) where T : DatabaseObject, new()
        {
            using (var transaction = EnsureTransaction())
            {
                var sources = SubQuery <T>(condition);
                var loaded  = new Dictionary <Guid, DatabaseObject>();

                foreach (var source in sources)
                {
                    loaded.Add(source.Id, source);
                }

                foreach (var source in sources)
                {
                    CascaseLoad(source, loaded);
                }

                return(sources);
            }
        }
Example #2
0
 public DataAndCondition(DataCondition a, DataCondition b)
 {
     A = a;
     B = b;
 }
Example #3
0
 public DataAndCondition And(DataCondition b)
 {
     return(new DataAndCondition(this, b));
 }