示例#1
0
 public override IEnumerable GetObjects(Type objectType, CriteriaOperator criteria, IList <DevExpress.Xpo.SortProperty> sorting)
 {
     if (Storage.Mappings.TryGetValue(objectType, out var mapping))
     {
         return(WrapLoading(() => {
             var loader = new DataStoreObjectLoader(Storage.Mappings, Storage.DataStore, objectMap);
             return loader.LoadObjects(objectType, criteria);
         }));
     }
     throw new NotImplementedException();
 }
示例#2
0
 public override object GetObjectByKey(Type objectType, object key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(nameof(key));
     }
     if (Storage.Mappings.TryGetValue(objectType, out var mapping))
     {
         return(WrapLoading(() => {
             var loader = new DataStoreObjectLoader(Storage.Mappings, Storage.DataStore, objectMap);
             return loader.LoadObjectByKey(objectType, key);
         }));
     }
     throw new NotImplementedException();
 }