IEnumerable <object> LazyLoad(LazyEntity parent, Type type, ICollection <IDataCriterion> criteria) { var info = _lazyFactory.InfoAbout(type); var repository = _lazyFactory.ReadingRepository(); foreach (var item in repository.Read(info, criteria)) { CopyLazyContext(parent, item); yield return(item); } }
public LazyDataGetter(IDataGetter <TEntity> getter, IDataManagerFactory lazyFactory) { _getter = getter; _lazyFactory = lazyFactory; _mainEntityInfo = _lazyFactory.InfoAbout <TEntity>(); }
/// <summary> /// Returns information about <typeparamref name="TEntity"/>. /// </summary> public IEntityInfo InfoAbout <TEntity>() { return(_factory.InfoAbout <TEntity>()); }