Ejemplo n.º 1
0
 public ReferenceInfo GetOrCreateReference(string name, EntityInfo referenceEntity,ReferenceKinds kind) {
     var result = this.GetReference(referenceEntity,kind);
     if (result == null) {
         result = new ReferenceInfo(name, this, referenceEntity, kind);
         this._references.Add(result);
     }
     
     return result;
 }
Ejemplo n.º 2
0
        public ReferenceInfo GetReference(EntityInfo referenceEntity, ReferenceKinds kind)
        {
            foreach (var rel in _references)
            {
                if (rel.ReferenceEntityInfo == referenceEntity)
                {
                    if (((int)rel.Kind & (int)kind) > 0) return rel;
                }
            }

            return null;
        }
Ejemplo n.º 3
0
 public JoinTables(EntityInfo info) { this.EntityInfo = info; }
Ejemplo n.º 4
0
 public ReferenceInfo(string name, EntityInfo primary, EntityInfo referenceEntity, ReferenceKinds kind) {
     this.PrimaryEntityInfo = primary;
     this.ReferenceEntityInfo = referenceEntity;
     this.Kind = kind;
     this.Name = name;
 }