Exemplo n.º 1
0
        public ParameterDirection Direction = ParameterDirection.Input; //true for Identity columns

        public EntityCommandParameter(EntityMemberInfo sourceMember)
        {
            SourceMember = sourceMember;
            Name         = sourceMember.MemberName; //@ is added by DbSqlBuilder
            DataType     = sourceMember.DataType;
            Size         = sourceMember.Size;
            DefaultValue = sourceMember.DefaultValue;
        }
Exemplo n.º 2
0
 public EntityKeyInfo(string keyName, KeyType keyType, EntityInfo entity, EntityMemberInfo ownerMember = null)
 {
     Name        = keyName;
     KeyType     = keyType;
     Entity      = entity;
     OwnerMember = ownerMember;
     entity.Keys.Add(this);
 }
Exemplo n.º 3
0
 public EntityKeyInfo(EntityInfo entity, KeyType keyType,
                      EntityMemberInfo ownerMember = null, string alias = null)
 {
     KeyType     = keyType;
     Entity      = entity;
     OwnerMember = ownerMember;
     Alias       = alias;
     entity.Keys.Add(this);
 }
Exemplo n.º 4
0
 public void AddMember(EntityMemberInfo member)
 {
     try {
         member.Index = this.Members.Count;
         Members.Add(member);
         MembersByName.Add(member.MemberName, member);
     } catch (Exception ex) {
         ex.AddValue("MemberName", member.MemberName);
         throw;
     }
 }
Exemplo n.º 5
0
        public LinqCommandInfo CountCommand;      //counts child records for a given parent - used by CanDelete() method

        public EntityReferenceInfo(EntityMemberInfo fromMember, EntityKeyInfo fromKey, EntityKeyInfo toKey)
        {
            FromMember          = fromMember;
            FromKey             = fromKey;
            ToKey               = toKey;
            ToKey.Entity.Flags |= EntityFlags.IsReferenced;
            var fromEnt = fromMember.Entity;

            //if it is ref from table, register incoming reference
            if (fromEnt.Kind == EntityKind.Table)
            {
                ToKey.Entity.IncomingReferences.Add(fromMember);
            }
            if (fromEnt == ToKey.Entity)
            {
                fromEnt.Flags |= EntityFlags.SelfReferencing;
            }
        }
Exemplo n.º 6
0
 public ChildEntityListInfo(EntityMemberInfo ownerMember)
 {
     OwnerMember = ownerMember;
 }
Exemplo n.º 7
0
 public EntityKeyMemberInfo(EntityMemberInfo member, bool desc)
 {
     Member = member;
     Desc   = desc;
 }
Exemplo n.º 8
0
 public bool IsSet(EntityMemberInfo member)
 {
     return(Bits.Get(member.ValueIndex));
 }
Exemplo n.º 9
0
 public void Set(EntityMemberInfo member, bool value = true)
 {
     Bits.Set(member.ValueIndex, value);
 }
Exemplo n.º 10
0
 public void Set(EntityMemberInfo member, bool value = true)
 {
     Bits[member.ValueIndex] = value;
 }
Exemplo n.º 11
0
 public bool IsSet(EntityMemberInfo member)
 {
     return(Bits[member.ValueIndex]);
 }