Example #1
0
        public ManyToOneRelation NewManyToOneRelation(ModelClass pkClass, ModelClass fkClass, string fkColumn)
        {
            ManyToOneRelation relation = new ManyToOneRelation(fkClass, pkClass)
            {
                SourceColumn       = fkColumn,
                TargetColumnKey    = fkColumn,
                TargetTable        = fkClass.Table,
                TargetPropertyName = NamingHelper.GetPlural(fkClass.Name)
            };

            return(relation);
        }
Example #2
0
        public ManyToOneRelation NewManyToOneRelation(ModelClass pkClass, ModelClass fkClass, string fkColumn)
        {
            ManyToOneRelation relation = new ManyToOneRelation(fkClass, pkClass);

            // TODO: Disabled to test server explorer drag drop bug of DeviceBuffer

            /*Log(
             *  String.Format("Relation: Type=ManyToOne, PKClass={0}, FKClass={1}, Column={2}", pkClass.Name,
             *                fkClass.Name, fkColumn));*/
            relation.SourceColumn       = fkColumn;
            relation.TargetColumnKey    = fkColumn;
            relation.TargetTable        = fkClass.Table;
            relation.TargetPropertyName = NamingHelper.GetPlural(fkClass.Name);

            return(relation);
        }