Exemplo n.º 1
0
 /// <summary> Retrieves all related entities of type 'ProductEntity' using a relation of type '1:n'.</summary>
 /// <param name="forceFetch">if true, it will discard any changes currently in the collection and will rerun the complete query instead</param>
 /// <param name="entityFactoryToUse">The entity factory to use for the GetMultiManyToOne() routine.</param>
 /// <param name="filter">Extra filter to limit the resultset.</param>
 /// <returns>Filled collection with all related entities of the type constructed by the passed in entity factory</returns>
 public virtual ProductSearchEngine.CollectionClasses.ProductCollection GetMultiProducts(bool forceFetch, IEntityFactory entityFactoryToUse, IPredicateExpression filter)
 {
     if ((!_alreadyFetchedProducts || forceFetch || _alwaysFetchProducts) && !this.IsSerializing && !this.IsDeserializing && !this.InDesignMode)
     {
         AddToTransactionIfNecessary(_products);
         _products.SuppressClearInGetMulti = !forceFetch;
         _products.EntityFactoryToUse      = entityFactoryToUse;
         _products.GetMultiManyToOne(this, null, null, filter);
         _products.SuppressClearInGetMulti = false;
         _alreadyFetchedProducts           = true;
     }
     return(_products);
 }