/// /// General DAO class for the Affiliate Entity. It will perform database oriented actions for /// a entity of type 'AffiliateEntity'. This DAO works on an EntityFields object. /// public partial class AffiliateDAO : DaoBase { /// CTor public AffiliateDAO() : base(InheritanceInfoProviderSingleton.GetInstance(), new DynamicQueryEngine(), InheritanceHierarchyType.None, "AffiliateEntity", new AffiliateEntityFactory(), new TypeDefaultValue()) { } /// CTor /// Inheritance info provider to use. /// Dqe to use. /// Type of inheritance. /// Name of the entity. /// Entity factory. /// Type defaultvalue supplier. internal AffiliateDAO(IInheritanceInfoProvider inheritanceInfoProviderToUse, DynamicQueryEngineBase dqeToUse, InheritanceHierarchyType typeOfInheritance, string entityName, IEntityFactory entityFactory, ITypeDefaultValue typeDefaultvalueSupplier) : base(inheritanceInfoProviderToUse, dqeToUse, typeOfInheritance, entityName, entityFactory, new TypeDefaultValue()) { } /// /// Retrieves entities of the type 'AffiliateEntity' in a datatable which match the specified filter. /// It will always create a new connection to the database. /// /// The maximum number of items to return with this retrieval query. /// If the used Dynamic Query Engine supports it, 'TOP' is used to limit the amount of rows to return. /// When set to 0, no limitations are specified. /// The order by specifications for the sorting of the resultset. When not specified, no sorting is applied. /// A predicate or predicate expression which should be used as filter for the entities to retrieve. /// The set of relations to walk to construct to total query. /// The page number to retrieve. /// The page size of the page to retrieve. /// a filled datatable if succeeded, false otherwise public virtual DataTable GetMultiAsDataTable(long maxNumberOfItemsToReturn, ISortExpression sortClauses, IPredicate selectFilter, IRelationCollection relations, int pageNumber, int pageSize) { IEntityFields fieldsToReturn = EntityFieldsFactory.CreateEntityFieldsObject(ADNSF.DataLayer.EntityType.AffiliateEntity); return base.PerformGetMultiAsDataTableAction(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize); } /// /// Determines the connection to use. If transaction to use is null, a new connection is created, otherwise the connection of the transaction is used. /// /// Transaction to use. /// a ready to use connection object. protected override IDbConnection DetermineConnectionToUse(ITransaction transactionToUse) { return DbUtils.DetermineConnectionToUse(transactionToUse); } /// /// Creates a new ADO.NET data adapter. /// /// ready to use ADO.NET data-adapter protected override DbDataAdapter CreateDataAdapter() { return DbUtils.CreateDataAdapter(); } }