Adapter usage

Posts   
 
    
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 03-Apr-2020 17:01:54   

From the online docs:

I try to get all records. In the "for each" loop, the entity "dsrSupport" only show me LLBLGen framework properties, there is no Specific "dsrSupport" entity properties? Why?

DataAccessAdapter adapter = new DataAccessAdapter();
            EntityCollection allSupport = new EntityCollection(new DsrSupportEntityFactory());
            adapter.FetchEntityCollection(allSupport, null);

            foreach (var dsrSupport in allSupport)
            {
                dsrSupport.  ==> Here intellisense show only LLBGen properties ?????
            }
Attachments
Filename File size Added on Approval
llblgen adapter.png 20,182 03-Apr-2020 17:02.18 Approved
Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 03-Apr-2020 17:10:37   

My Entity:

//////////////////////////////////////////////////////////////
// <auto-generated>This code was generated by LLBLGen Pro 5.6.</auto-generated>
//////////////////////////////////////////////////////////////
// Code is generated on: 
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Xml.Serialization;
using DsrModel.HelperClasses;
using DsrModel.FactoryClasses;
using DsrModel.RelationClasses;

using SD.LLBLGen.Pro.ORMSupportClasses;

namespace DsrModel.EntityClasses
{
    // __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
    // __LLBLGENPRO_USER_CODE_REGION_END

    /// <summary>Entity class which represents the entity 'DsrSupport'.<br/><br/></summary>
    [Serializable]
    public partial class DsrSupportEntity : CommonEntityBase
        // __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
        // __LLBLGENPRO_USER_CODE_REGION_END
    
    {
        private EntityCollection<DsrAttacheEntity> _dsrAttaches;
        private EntityCollection<DsrMutuelleEntity> _dsrMutuelles;
        private EntityCollection<DsrMutuelleEntity> _dsrMutuelles1;
        private EntityCollection<DsrSectionImpedanceEntity> _dsrSectionImpedances;
        private EntityCollection<DsrSectionImpedanceEntity> _dsrSectionImpedances1;
        private DsrTypeSupportEntity _dsrTypeSupport;
        // __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
        // __LLBLGENPRO_USER_CODE_REGION_END

        private static DsrSupportEntityStaticMetaData _staticMetaData = new DsrSupportEntityStaticMetaData();
        private static DsrSupportRelations _relationsFactory = new DsrSupportRelations();

        /// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
        public static partial class MemberNames
        {
            /// <summary>Member name DsrTypeSupport</summary>
            public static readonly string DsrTypeSupport = "DsrTypeSupport";
            /// <summary>Member name DsrAttaches</summary>
            public static readonly string DsrAttaches = "DsrAttaches";
            /// <summary>Member name DsrMutuelles</summary>
            public static readonly string DsrMutuelles = "DsrMutuelles";
            /// <summary>Member name DsrMutuelles1</summary>
            public static readonly string DsrMutuelles1 = "DsrMutuelles1";
            /// <summary>Member name DsrSectionImpedances</summary>
            public static readonly string DsrSectionImpedances = "DsrSectionImpedances";
            /// <summary>Member name DsrSectionImpedances1</summary>
            public static readonly string DsrSectionImpedances1 = "DsrSectionImpedances1";
        }

        /// <summary>Static meta-data storage for navigator related information</summary>
        protected class DsrSupportEntityStaticMetaData : EntityStaticMetaDataBase
        {
            public DsrSupportEntityStaticMetaData()
            {
                SetEntityCoreInfo("DsrSupportEntity", InheritanceHierarchyType.None, false, (int)DsrModel.EntityType.DsrSupportEntity, typeof(DsrSupportEntity), typeof(DsrSupportEntityFactory), false);
                AddNavigatorMetaData<DsrSupportEntity, EntityCollection<DsrAttacheEntity>>("DsrAttaches", a => a._dsrAttaches, (a, b) => a._dsrAttaches = b, a => a.DsrAttaches, () => new DsrSupportRelations().DsrAttacheEntityUsingSupIdSupport, typeof(DsrAttacheEntity), (int)DsrModel.EntityType.DsrAttacheEntity);
                AddNavigatorMetaData<DsrSupportEntity, EntityCollection<DsrMutuelleEntity>>("DsrMutuelles", a => a._dsrMutuelles, (a, b) => a._dsrMutuelles = b, a => a.DsrMutuelles, () => new DsrSupportRelations().DsrMutuelleEntityUsingSupIdSupportDebut, typeof(DsrMutuelleEntity), (int)DsrModel.EntityType.DsrMutuelleEntity);
                AddNavigatorMetaData<DsrSupportEntity, EntityCollection<DsrMutuelleEntity>>("DsrMutuelles1", a => a._dsrMutuelles1, (a, b) => a._dsrMutuelles1 = b, a => a.DsrMutuelles1, () => new DsrSupportRelations().DsrMutuelleEntityUsingSupIdSupportFin, typeof(DsrMutuelleEntity), (int)DsrModel.EntityType.DsrMutuelleEntity);
                AddNavigatorMetaData<DsrSupportEntity, EntityCollection<DsrSectionImpedanceEntity>>("DsrSectionImpedances", a => a._dsrSectionImpedances, (a, b) => a._dsrSectionImpedances = b, a => a.DsrSectionImpedances, () => new DsrSupportRelations().DsrSectionImpedanceEntityUsingSupIdSupportDebut, typeof(DsrSectionImpedanceEntity), (int)DsrModel.EntityType.DsrSectionImpedanceEntity);
                AddNavigatorMetaData<DsrSupportEntity, EntityCollection<DsrSectionImpedanceEntity>>("DsrSectionImpedances1", a => a._dsrSectionImpedances1, (a, b) => a._dsrSectionImpedances1 = b, a => a.DsrSectionImpedances1, () => new DsrSupportRelations().DsrSectionImpedanceEntityUsingSupIdSupportFin, typeof(DsrSectionImpedanceEntity), (int)DsrModel.EntityType.DsrSectionImpedanceEntity);
                AddNavigatorMetaData<DsrSupportEntity, DsrTypeSupportEntity>("DsrTypeSupport", "DsrSupports", (a, b) => a._dsrTypeSupport = b, a => a._dsrTypeSupport, (a, b) => a.DsrTypeSupport = b, DsrModel.RelationClasses.StaticDsrSupportRelations.DsrTypeSupportEntityUsingTysIdTypeStatic, ()=>new DsrSupportRelations().DsrTypeSupportEntityUsingTysIdType, null, new int[] { (int)DsrSupportFieldIndex.TysIdType }, null, true, (int)DsrModel.EntityType.DsrTypeSupportEntity);
            }
        }

        /// <summary>Static ctor</summary>
        static DsrSupportEntity()
        {
        }

        /// <summary> CTor</summary>
        public DsrSupportEntity()
        {
            InitClassEmpty(null, null);
        }

        /// <summary> CTor</summary>
        /// <param name="fields">Fields object to set as the fields for this entity.</param>
        public DsrSupportEntity(IEntityFields2 fields)
        {
            InitClassEmpty(null, fields);
        }

        /// <summary> CTor</summary>
        /// <param name="validator">The custom validator object for this DsrSupportEntity</param>
        public DsrSupportEntity(IValidator validator)
        {
            InitClassEmpty(validator, null);
        }

        /// <summary> CTor</summary>
        /// <param name="supIdSupport">PK value for DsrSupport which data should be fetched into this DsrSupport object</param>
        public DsrSupportEntity(System.Decimal supIdSupport) : this(supIdSupport, null)
        {
        }

        /// <summary> CTor</summary>
        /// <param name="supIdSupport">PK value for DsrSupport which data should be fetched into this DsrSupport object</param>
        /// <param name="validator">The custom validator object for this DsrSupportEntity</param>
        public DsrSupportEntity(System.Decimal supIdSupport, IValidator validator)
        {
            InitClassEmpty(validator, null);
            this.SupIdSupport = supIdSupport;
        }

        /// <summary>Private CTor for deserialization</summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected DsrSupportEntity(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            // __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
            // __LLBLGENPRO_USER_CODE_REGION_END
        }

        /// <summary>Method which will construct a filter (predicate expression) for the unique constraint defined on the fields: SupLatitude , SupLongitude .</summary>
        /// <returns>true if succeeded and the contents is read, false otherwise</returns>
        public IPredicateExpression ConstructFilterForUCSupLatitudeSupLongitude()
        {
            var filter = new PredicateExpression();
            filter.Add(DsrModel.HelperClasses.DsrSupportFields.SupLatitude == this.Fields.GetCurrentValue((int)DsrSupportFieldIndex.SupLatitude));
            filter.Add(DsrModel.HelperClasses.DsrSupportFields.SupLongitude == this.Fields.GetCurrentValue((int)DsrSupportFieldIndex.SupLongitude));
            return filter;
        }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'DsrAttache' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrAttaches() { return CreateRelationInfoForNavigator("DsrAttaches"); }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'DsrMutuelle' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrMutuelles() { return CreateRelationInfoForNavigator("DsrMutuelles"); }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'DsrMutuelle' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrMutuelles1() { return CreateRelationInfoForNavigator("DsrMutuelles1"); }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'DsrSectionImpedance' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrSectionImpedances() { return CreateRelationInfoForNavigator("DsrSectionImpedances"); }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'DsrSectionImpedance' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrSectionImpedances1() { return CreateRelationInfoForNavigator("DsrSectionImpedances1"); }

        /// <summary>Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'DsrTypeSupport' to this entity.</summary>
        /// <returns></returns>
        public virtual IRelationPredicateBucket GetRelationInfoDsrTypeSupport() { return CreateRelationInfoForNavigator("DsrTypeSupport"); }
        
        /// <inheritdoc/>
        protected override EntityStaticMetaDataBase GetEntityStaticMetaData() { return _staticMetaData; }

        /// <summary>Initializes the class members</summary>
        private void InitClassMembers()
        {
            PerformDependencyInjection();
            // __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
            // __LLBLGENPRO_USER_CODE_REGION_END

            OnInitClassMembersComplete();
        }

        /// <summary>Initializes the class with empty data, as if it is a new Entity.</summary>
        /// <param name="validator">The validator object for this DsrSupportEntity</param>
        /// <param name="fields">Fields of this entity</param>
        private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
        {
            OnInitializing();
            this.Fields = fields ?? CreateFields();
            this.Validator = validator;
            InitClassMembers();
            // __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
            // __LLBLGENPRO_USER_CODE_REGION_END


            OnInitialized();
        }

        /// <summary>The relations object holding all relations of this entity with other entity classes.</summary>
        public static DsrSupportRelations Relations { get { return _relationsFactory; } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrAttache' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrAttaches { get { return _staticMetaData.GetPrefetchPathElement("DsrAttaches", CommonEntityBase.CreateEntityCollection<DsrAttacheEntity>()); } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrMutuelle' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrMutuelles { get { return _staticMetaData.GetPrefetchPathElement("DsrMutuelles", CommonEntityBase.CreateEntityCollection<DsrMutuelleEntity>()); } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrMutuelle' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrMutuelles1 { get { return _staticMetaData.GetPrefetchPathElement("DsrMutuelles1", CommonEntityBase.CreateEntityCollection<DsrMutuelleEntity>()); } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrSectionImpedance' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrSectionImpedances { get { return _staticMetaData.GetPrefetchPathElement("DsrSectionImpedances", CommonEntityBase.CreateEntityCollection<DsrSectionImpedanceEntity>()); } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrSectionImpedance' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrSectionImpedances1 { get { return _staticMetaData.GetPrefetchPathElement("DsrSectionImpedances1", CommonEntityBase.CreateEntityCollection<DsrSectionImpedanceEntity>()); } }

        /// <summary>Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'DsrTypeSupport' for this entity.</summary>
        /// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
        public static IPrefetchPathElement2 PrefetchPathDsrTypeSupport { get { return _staticMetaData.GetPrefetchPathElement("DsrTypeSupport", CommonEntityBase.CreateEntityCollection<DsrTypeSupportEntity>()); } }

        /// <summary>The SupAngleRef property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_ANGLE_REF".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual Nullable<System.Decimal> SupAngleRef
        {
            get { return (Nullable<System.Decimal>)GetValue((int)DsrSupportFieldIndex.SupAngleRef, false); }
            set { SetValue((int)DsrSupportFieldIndex.SupAngleRef, value); }
        }

        /// <summary>The SupDistanceRef property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_DISTANCE_REF".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual Nullable<System.Decimal> SupDistanceRef
        {
            get { return (Nullable<System.Decimal>)GetValue((int)DsrSupportFieldIndex.SupDistanceRef, false); }
            set { SetValue((int)DsrSupportFieldIndex.SupDistanceRef, value); }
        }

        /// <summary>The SupIdSupport property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_ID_SUPPORT".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
        public virtual System.Decimal SupIdSupport
        {
            get { return (System.Decimal)GetValue((int)DsrSupportFieldIndex.SupIdSupport, true); }
            set { SetValue((int)DsrSupportFieldIndex.SupIdSupport, value); }
        }

        /// <summary>The SupLatitude property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_LATITUDE".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual Nullable<System.Decimal> SupLatitude
        {
            get { return (Nullable<System.Decimal>)GetValue((int)DsrSupportFieldIndex.SupLatitude, false); }
            set { SetValue((int)DsrSupportFieldIndex.SupLatitude, value); }
        }

        /// <summary>The SupLongitude property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_LONGITUDE".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual Nullable<System.Decimal> SupLongitude
        {
            get { return (Nullable<System.Decimal>)GetValue((int)DsrSupportFieldIndex.SupLongitude, false); }
            set { SetValue((int)DsrSupportFieldIndex.SupLongitude, value); }
        }

        /// <summary>The SupPositionRef property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."SUP_POSITION_REF".<br/>Table field type characteristics (type, precision, scale, length): Varchar2, 0, 0, 50.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual System.String SupPositionRef
        {
            get { return (System.String)GetValue((int)DsrSupportFieldIndex.SupPositionRef, true); }
            set { SetValue((int)DsrSupportFieldIndex.SupPositionRef, value); }
        }

        /// <summary>The TysIdType property of the Entity DsrSupport<br/><br/></summary>
        /// <remarks>Mapped on  table field: "DSR_SUPPORT"."TYS_ID_TYPE".<br/>Table field type characteristics (type, precision, scale, length): Decimal, 38, 38, 0.<br/>Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
        public virtual Nullable<System.Decimal> TysIdType
        {
            get { return (Nullable<System.Decimal>)GetValue((int)DsrSupportFieldIndex.TysIdType, false); }
            set { SetValue((int)DsrSupportFieldIndex.TysIdType, value); }
        }

        /// <summary>Gets the EntityCollection with the related entities of type 'DsrAttacheEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
        [TypeContainedAttribute(typeof(DsrAttacheEntity))]
        public virtual EntityCollection<DsrAttacheEntity> DsrAttaches { get { return GetOrCreateEntityCollection<DsrAttacheEntity, DsrAttacheEntityFactory>("DsrSupport", true, false, ref _dsrAttaches); } }

        /// <summary>Gets the EntityCollection with the related entities of type 'DsrMutuelleEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
        [TypeContainedAttribute(typeof(DsrMutuelleEntity))]
        public virtual EntityCollection<DsrMutuelleEntity> DsrMutuelles { get { return GetOrCreateEntityCollection<DsrMutuelleEntity, DsrMutuelleEntityFactory>("DsrSupport", true, false, ref _dsrMutuelles); } }

        /// <summary>Gets the EntityCollection with the related entities of type 'DsrMutuelleEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
        [TypeContainedAttribute(typeof(DsrMutuelleEntity))]
        public virtual EntityCollection<DsrMutuelleEntity> DsrMutuelles1 { get { return GetOrCreateEntityCollection<DsrMutuelleEntity, DsrMutuelleEntityFactory>("DsrSupport1", true, false, ref _dsrMutuelles1); } }

        /// <summary>Gets the EntityCollection with the related entities of type 'DsrSectionImpedanceEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
        [TypeContainedAttribute(typeof(DsrSectionImpedanceEntity))]
        public virtual EntityCollection<DsrSectionImpedanceEntity> DsrSectionImpedances { get { return GetOrCreateEntityCollection<DsrSectionImpedanceEntity, DsrSectionImpedanceEntityFactory>("DsrSupport", true, false, ref _dsrSectionImpedances); } }

        /// <summary>Gets the EntityCollection with the related entities of type 'DsrSectionImpedanceEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
        [TypeContainedAttribute(typeof(DsrSectionImpedanceEntity))]
        public virtual EntityCollection<DsrSectionImpedanceEntity> DsrSectionImpedances1 { get { return GetOrCreateEntityCollection<DsrSectionImpedanceEntity, DsrSectionImpedanceEntityFactory>("DsrSupport1", true, false, ref _dsrSectionImpedances1); } }

        /// <summary>Gets / sets related entity of type 'DsrTypeSupportEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
        [Browsable(false)]
        public virtual DsrTypeSupportEntity DsrTypeSupport
        {
            get { return _dsrTypeSupport; }
            set { SetSingleRelatedEntityNavigator(value, "DsrTypeSupport"); }
        }
        // __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
        // __LLBLGENPRO_USER_CODE_REGION_END


    }
}

namespace DsrModel
{
    public enum DsrSupportFieldIndex
    {
        ///<summary>SupAngleRef. </summary>
        SupAngleRef,
        ///<summary>SupDistanceRef. </summary>
        SupDistanceRef,
        ///<summary>SupIdSupport. </summary>
        SupIdSupport,
        ///<summary>SupLatitude. </summary>
        SupLatitude,
        ///<summary>SupLongitude. </summary>
        SupLongitude,
        ///<summary>SupPositionRef. </summary>
        SupPositionRef,
        ///<summary>TysIdType. </summary>
        TysIdType,
        /// <summary></summary>
        AmountOfFields
    }
}

namespace DsrModel.RelationClasses
{
    /// <summary>Implements the relations factory for the entity: DsrSupport. </summary>
    public partial class DsrSupportRelations: RelationFactory
    {
        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrAttacheEntity over the 1:n relation they have, using the relation between the fields: DsrSupport.SupIdSupport - DsrAttache.SupIdSupport</summary>
        public virtual IEntityRelation DsrAttacheEntityUsingSupIdSupport
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "DsrAttaches", true, new[] { DsrSupportFields.SupIdSupport, DsrAttacheFields.SupIdSupport }); }
        }

        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrMutuelleEntity over the 1:n relation they have, using the relation between the fields: DsrSupport.SupIdSupport - DsrMutuelle.SupIdSupportDebut</summary>
        public virtual IEntityRelation DsrMutuelleEntityUsingSupIdSupportDebut
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "DsrMutuelles", true, new[] { DsrSupportFields.SupIdSupport, DsrMutuelleFields.SupIdSupportDebut }); }
        }

        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrMutuelleEntity over the 1:n relation they have, using the relation between the fields: DsrSupport.SupIdSupport - DsrMutuelle.SupIdSupportFin</summary>
        public virtual IEntityRelation DsrMutuelleEntityUsingSupIdSupportFin
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "DsrMutuelles1", true, new[] { DsrSupportFields.SupIdSupport, DsrMutuelleFields.SupIdSupportFin }); }
        }

        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrSectionImpedanceEntity over the 1:n relation they have, using the relation between the fields: DsrSupport.SupIdSupport - DsrSectionImpedance.SupIdSupportDebut</summary>
        public virtual IEntityRelation DsrSectionImpedanceEntityUsingSupIdSupportDebut
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "DsrSectionImpedances", true, new[] { DsrSupportFields.SupIdSupport, DsrSectionImpedanceFields.SupIdSupportDebut }); }
        }

        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrSectionImpedanceEntity over the 1:n relation they have, using the relation between the fields: DsrSupport.SupIdSupport - DsrSectionImpedance.SupIdSupportFin</summary>
        public virtual IEntityRelation DsrSectionImpedanceEntityUsingSupIdSupportFin
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.OneToMany, "DsrSectionImpedances1", true, new[] { DsrSupportFields.SupIdSupport, DsrSectionImpedanceFields.SupIdSupportFin }); }
        }

        /// <summary>Returns a new IEntityRelation object, between DsrSupportEntity and DsrTypeSupportEntity over the m:1 relation they have, using the relation between the fields: DsrSupport.TysIdType - DsrTypeSupport.TysIdType</summary>
        public virtual IEntityRelation DsrTypeSupportEntityUsingTysIdType
        {
            get { return ModelInfoProviderSingleton.GetInstance().CreateRelation(RelationType.ManyToOne, "DsrTypeSupport", false, new[] { DsrTypeSupportFields.TysIdType, DsrSupportFields.TysIdType }); }
        }

    }
    
    /// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
    internal static class StaticDsrSupportRelations
    {
        internal static readonly IEntityRelation DsrAttacheEntityUsingSupIdSupportStatic = new DsrSupportRelations().DsrAttacheEntityUsingSupIdSupport;
        internal static readonly IEntityRelation DsrMutuelleEntityUsingSupIdSupportDebutStatic = new DsrSupportRelations().DsrMutuelleEntityUsingSupIdSupportDebut;
        internal static readonly IEntityRelation DsrMutuelleEntityUsingSupIdSupportFinStatic = new DsrSupportRelations().DsrMutuelleEntityUsingSupIdSupportFin;
        internal static readonly IEntityRelation DsrSectionImpedanceEntityUsingSupIdSupportDebutStatic = new DsrSupportRelations().DsrSectionImpedanceEntityUsingSupIdSupportDebut;
        internal static readonly IEntityRelation DsrSectionImpedanceEntityUsingSupIdSupportFinStatic = new DsrSupportRelations().DsrSectionImpedanceEntityUsingSupIdSupportFin;
        internal static readonly IEntityRelation DsrTypeSupportEntityUsingTysIdTypeStatic = new DsrSupportRelations().DsrTypeSupportEntityUsingTysIdType;

        /// <summary>CTor</summary>
        static StaticDsrSupportRelations() { }
    }
}

Wally
User
Posts: 285
Joined: 29-Aug-2007
# Posted on: 03-Apr-2020 17:16:46   

Fixed (should cast to the proper type):

DataAccessAdapter adapter = new DataAccessAdapter();
            EntityCollection allSupport = new EntityCollection(new DsrSupportEntityFactory());
            adapter.FetchEntityCollection(allSupport, null);

            foreach (DsrSupportEntity dsrSupport in allSupport)
            {
                dsrSupport.
            }