Exemplo n.º 1
0
 public ManyToManyPart <TChild> AsTernaryAssociation(Type indexType, string indexColumn, Type typeOfValue, string valueColumn, Action <IndexManyToManyPart> indexAction)
 {
     this.EnsureDictionary();
     this.manyToManyIndex = new IndexManyToManyPart(typeof(ManyToManyPart <TChild>));
     this.manyToManyIndex.Column(indexColumn);
     this.manyToManyIndex.Type(indexType);
     if (indexAction != null)
     {
         indexAction(this.manyToManyIndex);
     }
     this.ChildKeyColumn(valueColumn);
     this.valueType = typeOfValue;
     this.isTernary = true;
     return(this);
 }
Exemplo n.º 2
0
        public ManyToManyPart <TChild> AsTernaryAssociation(Type indexType, string indexColumn, Type valueType, string valueColumn)
        {
            EnsureDictionary();

            manyToManyIndex = new IndexManyToManyPart(typeof(ManyToManyPart <TChild>));
            manyToManyIndex.Column(indexColumn);
            manyToManyIndex.Type(indexType);

            ChildKeyColumn(valueColumn);
            this.valueType = valueType;

            isTernary = true;

            return(this);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Specify that this is a ternary association
        /// </summary>
        /// <param name="indexColumnName">Index column</param>
        public OneToManyPart <TChild> AsTernaryAssociation(string indexColumnName)
        {
            EnsureGenericDictionary();

            var keyType = childType.GetGenericArguments()[0];
            var valType = childType.GetGenericArguments()[1];

            manyToManyIndex = new IndexManyToManyPart(typeof(ManyToManyPart <TChild>));
            manyToManyIndex.Column(indexColumnName);
            manyToManyIndex.Type(keyType);

            valueType = valType;
            isTernary = true;

            return(this);
        }
Exemplo n.º 4
0
        public ManyToManyPart <TChild> AsTernaryAssociation(string indexColumn, string valueColumn, Action <IndexManyToManyPart> indexAction)
        {
            this.EnsureGenericDictionary();
            Type indexType = typeof(TChild).GetGenericArguments()[0];
            Type type      = typeof(TChild).GetGenericArguments()[1];

            this.manyToManyIndex = new IndexManyToManyPart(typeof(ManyToManyPart <TChild>));
            this.manyToManyIndex.Column(indexColumn);
            this.manyToManyIndex.Type(indexType);
            if (indexAction != null)
            {
                indexAction(this.manyToManyIndex);
            }
            this.ChildKeyColumn(valueColumn);
            this.valueType = type;
            this.isTernary = true;
            return(this);
        }
Exemplo n.º 5
0
        public ManyToManyPart <TChild> AsTernaryAssociation(string indexColumn, string valueColumn)
        {
            EnsureGenericDictionary();

            var indexType = typeof(TChild).GetGenericArguments()[0];
            var valueType = typeof(TChild).GetGenericArguments()[1];

            manyToManyIndex = new IndexManyToManyPart(typeof(ManyToManyPart <TChild>));
            manyToManyIndex.Column(indexColumn);
            manyToManyIndex.Type(indexType);

            ChildKeyColumn(valueColumn);
            this.valueType = valueType;

            isTernary = true;

            return(this);
        }