Exemplo n.º 1
0
        void AddConventionForManyToMany(dynamic callInfo)
        {
            var repo = RepositoryFor(callInfo.Name, callInfo.Instance.__ConnectionString__());

            var referenceRepo = RepositoryFor(callInfo.Instance.__Table__(), callInfo.Instance.__ConnectionString__());

            var manyToMany = new HasManyAndBelongsTo(repo, referenceRepo);

            manyToMany.XRefFromColumn = ParentKey(callInfo);

            manyToMany.XRefToColumn = ChildKey(callInfo);

            InitAssociation(manyToMany, callInfo.Instance);
        }
Exemplo n.º 2
0
        void AddConventionForManyToMany(dynamic callInfo)
        {
            var repo = RepositoryFor(callInfo.Name, callInfo.Instance.__ConnectionString__());

            var referenceRepo = RepositoryFor(callInfo.Instance.__Table__(), callInfo.Instance.__ConnectionString__());

            var manyToMany = new HasManyAndBelongsTo(repo, referenceRepo);

            manyToMany.XRefFromColumn = ParentKey(callInfo);

            manyToMany.XRefToColumn = ChildKey(callInfo);

            InitAssociation(manyToMany, callInfo.Instance);
        }