Click or drag to resize
IDataAccessAdapterFetchNewEntity Method (IEntityFactory2, IRelationPredicateBucket, IPrefetchPath2, Context)
Fetches a new entity using the filter/relation combination filter passed in via filterBucket and the new entity is created using the passed in entity factory. Use this method when fetching a related entity using a current entity (for example, fetch the related Customer entity of an existing Order entity)

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: (5.3.0)
IEntity2 FetchNewEntity(
	IEntityFactory2 entityFactoryToUse,
	IRelationPredicateBucket filterBucket,
	IPrefetchPath2 prefetchPath,
	Context contextToUse


Type: SD.LLBLGen.Pro.ORMSupportClassesIEntityFactory2
The factory which will be used to create a new entity object which will be fetched
Type: SD.LLBLGen.Pro.ORMSupportClassesIRelationPredicateBucket
the completely filled in IRelationPredicateBucket object which will be used as a filter for the fetch. The fetch will only load the first entity loaded, even if the filter results into more entities being fetched
Type: SD.LLBLGen.Pro.ORMSupportClassesIPrefetchPath2
The prefetch path to use for this fetch, which will fetch all related entities defined by the path as well.
Type: SD.LLBLGen.Pro.ORMSupportClassesContext
The context to add the entity to if the fetch was succesful, and before the prefetch path is fetched. This ensures that the prefetch path is fetched using the context specified and will re-use already loaded entity objects.

Return Value

Type: IEntity2
The new entity fetched, or a previous entity fetched if that entity was in the context specified
See Also