/// <summary>Fetches the contents of this entity from the persistent storage using the primary key specified in a polymorphic way, so the entity returned could be of a subtype of the current entity or the current entity.</summary> /// <param name="transactionToUse">transaction to use during fetch</param> /// <param name="auditInfoId">PK value for OrderAuditInfo which data should be fetched into this OrderAuditInfo object</param> /// <param name="contextToUse">Context to use for fetch</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>Fetched entity of the type of this entity or a subtype, or an empty entity of that type if not found.</returns> public static new OrderAuditInfoEntity FetchPolymorphic(ITransaction transactionToUse, System.Int32 auditInfoId, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IEntityFields fields = EntityFieldsFactory.CreateEntityFieldsObject(Northwind.SSDAL.EntityType.OrderAuditInfoEntity); fields.ForcedValueWrite((int)OrderAuditInfoFieldIndex.AuditInfoId, auditInfoId); return((OrderAuditInfoEntity) new OrderAuditInfoDAO().FetchExistingPolymorphic(transactionToUse, fields, contextToUse, excludedIncludedFields)); }
/// <summary>Fetches the contents of this entity from the persistent storage using the primary key specified in a polymorphic way, so the entity returned could be of a subtype of the current entity or the current entity.</summary> /// <param name="transactionToUse">transaction to use during fetch</param> /// <param name="auditInfoId">PK value for AuditInfo which data should be fetched into this AuditInfo object</param> /// <param name="contextToUse">Context to use for fetch</param> /// <param name="excludedIncludedFields">The list of IEntityField objects which have to be excluded or included for the fetch. /// If null or empty, all fields are fetched (default). If an instance of ExcludeIncludeFieldsList is passed in and its ExcludeContainedFields property /// is set to false, the fields contained in excludedIncludedFields are kept in the query, the rest of the fields in the query are excluded.</param> /// <returns>Fetched entity of the type of this entity or a subtype, or an empty entity of that type if not found.</returns> public static AuditInfoEntity FetchPolymorphic(ITransaction transactionToUse, System.Int32 auditInfoId, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields) { IEntityFields fields = EntityFieldsFactory.CreateEntityFieldsObject(SD.LLBLGen.Pro.Examples.Auditing.EntityType.AuditInfoEntity); fields.ForcedValueWrite((int)AuditInfoFieldIndex.AuditInfoId, auditInfoId); return((AuditInfoEntity) new AuditInfoDAO().FetchExistingPolymorphic(transactionToUse, fields, contextToUse, excludedIncludedFields)); }