Class LazyPropsLoader
OpenSource implementation of lazy Props loading for MS SQL Server.
Uses get_object_json SQL function for simple and efficient loading.
public class LazyPropsLoader : ILazyPropsLoader
Inheritance
Implements
Methods
LoadProps<TProps>(long, long)
Synchronous Props loading (for getter).
public TProps LoadProps<TProps>(long objectId, long schemeId) where TProps : class, new()
LoadPropsAsync<TProps>(long, long)
Async Props loading for single object via get_object_json.
public Task<TProps> LoadPropsAsync<TProps>(long objectId, long schemeId) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?, int?)
BULK Props loading with projection filter and custom depth.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds, int? propsDepth) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, HashSet<long>?)
BULK Props loading with projection filter (for Select projections).
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, HashSet<long>? projectedStructureIds) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>, int?)
BULK Props loading with custom depth for nested RedbObject.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects, int? propsDepth) where TProps : class, new()
LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>>)
BULK Props loading for multiple objects via get_object_json batch.
public Task LoadPropsForManyAsync<TProps>(List<RedbObject<TProps>> objects) where TProps : class, new()
LoadPropsForManyPolymorphicAsync(List<IRedbObject>)
BULK loading for polymorphic objects (different schemes).
public Task LoadPropsForManyPolymorphicAsync(List<IRedbObject> objects)