예제 #1
0
        void AddConventionForHasOneThrough(dynamic callInfo)
        {
            var repo = RepositoryFor(Pluralize(callInfo.Name), callInfo.Instance.__ConnectionString__());

            var throughRepo = RepositoryFor(ManyToManyTableName(callInfo), callInfo.Instance.__ConnectionString__());

            var hasOneThrough = new HasOneThrough(repo, throughRepo, callInfo.Name);

            hasOneThrough.XRefFromColumn = ParentKey(callInfo);

            hasOneThrough.XRefToColumn = ChildKey(callInfo);

            InitAssociation(hasOneThrough, callInfo.Instance);
        }
예제 #2
0
파일: Association.cs 프로젝트: eugman/Oak
        void AddConventionForHasOneThrough(dynamic callInfo)
        {
            var repo = RepositoryFor(Pluralize(callInfo.Name), callInfo.Instance.__ConnectionString__());

            var throughRepo = RepositoryFor(ManyToManyTableName(callInfo), callInfo.Instance.__ConnectionString__());

            var hasOneThrough = new HasOneThrough(repo, throughRepo, callInfo.Name);

            hasOneThrough.XRefFromColumn = ParentKey(callInfo);

            hasOneThrough.XRefToColumn = ChildKey(callInfo);

            InitAssociation(hasOneThrough, callInfo.Instance);
        }