Click or drag to resize
IDataAccessAdapterFetchNewEntityTEntity Method (IRelationPredicateBucket, Context)
Fetches a new entity using the filter/relation combination filter passed in via filterBucket and the new entity is created using the specified generic type. 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.0 (5.3.0)
Syntax
TEntity FetchNewEntity<TEntity>(
	IRelationPredicateBucket filterBucket,
	Context contextToUse
)
where TEntity : new(), EntityBase2, IEntity2

Parameters

filterBucket
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
contextToUse
Type: SD.LLBLGen.Pro.ORMSupportClassesContext
The context to add the entity to if the fetch was succesful.

Type Parameters

TEntity
The type of entity to fetch

Return Value

Type: TEntity
The new entity fetched, or a previous entity fetched if that entity was in the context specified
Remarks
TEntity can't be a type which is an abstract entity. If you want to fetch an instance of an abstract entity (e.g. polymorphic fetch) please use the overload which accepts an entity factory instead
See Also